SendDocuments - cMapiHandler
Opens a message dialog in which the user can enter/specify receivers of the document(s) and can specify a body text
Type: Function
Return Data Type: Integer
Parameters
| Parameter | Type | Description |
|---|---|---|
| sDelimChar | String | The character used to separate the filenames and pathnames when used multiple documents. Usually a semi-colon. |
| sFullPaths | String | The files (documents) to send. The filename is without the path. |
| sPathNames | String | The file paths to the documents to send. The filename is also part of the pathname. |
Syntax
Function SendDocuments String sDelimChar String sFullPaths String sPathNames Returns Integer
Call Example
Get SendDocuments sDelimChar sFullPaths sPathNames to IntegerVariable
Description
The SendDocuments function will open a message dialog in which the user can enter/specify receivers of the document(s) and can specify a body text. The function is easier to use than composing a new message from the programming language but requires user interaction.
The SendDocuments 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. SendDocuments differs from the SendMail function in that it allows less flexibility in message generation.
This function returns one of the following error codes if not successful:
| Error code | Explanation |
|---|---|
| 1 | The user canceled one of the dialog boxes. No message was sent. |
| 2 | One or more unspecified errors occurred while sending the message. It is not known if the message was sent. |
| 3 | There was no default logon, and the user failed to log on successfully when the logon dialog box was displayed. No message was sent. |
| 5 | There was insufficient memory to proceed. |
| 12 | One or more files in the lpszFilePaths parameter could not be located. No message was sent. |
| 13 | An attachment could not be written to a temporary file. Check directory permissions. |
Example
integer iRetVal
Get SendDocuments Of oMapiSession sSeparator sPathNames sFileNames To iRetval
Return Value
Returns an error code if not successful