Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

MAPISendDocuments (mapi32)
 
.
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

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions