mapisenddocuments (mapi32)
Last changed: consultants@russte.com-69.76.127.174

.
Summary
MAPISendDocuments - Sends a standard message with one or more attached files and a cover note.

C# Signature:

  /// <summary>
  /// The MAPISendDocuments function sends a standard message with one or more attached files and a cover note.
  ///
  /// The cover note is a dialog box that allows the user to enter a list of recipients and an optional
  /// message. MAPISendDocuments differs from the MAPISendMail function in that it allows
  /// less flexibility in message generation.
  /// </summary>
  [DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]
  public static extern uint MAPISendDocuments(IntPtr ulUIParam, string lpszDelimChar, string lpszFullPaths,
    string lpszFileNames, uint ulReserved);

VB Signature:

  Please add!

User-Defined Structures:

None.

User-Defined Constants:

MAPI

Notes:

None.

Tips & Tricks:

Caution
I'm finding that calling this function sets your Current Working Directory to something other than what it was before the call is made. In my case, it was setting it to @"C:\Program Files\Common Files\SYSTEM\MSMAPI\1033"

You may want to save and then restore your working dir if you use this function:

string currentDirectory = System.IO.Directory.GetCurrentDirectory();

MAPISendDocuments (....);

// Restore the proper working directory.

System.IO.Directory.SetCurrentDirectory (currentDirectory);

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation