sendDocuments Method

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Object Reference > DBWJMail Methods >

sendDocuments Method

MechWorks MWScriptGUI Scripting Utility Object

object: DBWJMail.MAPI

Allows to create an e-mail with a list of attachments. The e-mail is displayed before sending allowing the user to add notes and/or set the recipients

This function creates the e-mail and displays it on screen in the default mail client.

Syntax

[form!]DBWJMail.sendDocuments(docsArray as Variant(Array of Strings or Array of Variants of type String)), vSubject as Variant(String), vBody as Variant(String), vRecipient as Variant(String))

Parameters

docsArray

array of documents to be attached. If the document doesn't exist it is not added

vSubject

subject of the new e-mail

vBody

body of the e-mail. Necessary, if empty sets some spaces instead

vRecipient

recipient. Necessary, if missing a default one is set

Remarks

MapiIsInstalled() as boolean

This function can be called to test whether MAPI is installed on the computer. This component is necessary.

Returns true if MAPI is installed, false otherwise.

Example

Example of creation of an e-mail with two attachments:

dim mapiObject
set mapiObject = createObject("DBWJMail.MAPI")
dim attachments(2)
attachments(0) = "c:\temp\IMC32.ACM"
attachments(1) = "c:\temp\htmlOutput.htm"
mapiObject.sendDocuments attachments,"Cad files","Files to be approved by you","[email protected]"
set mapiObject = nothing

Notes: the object has been tested with Microsoft Outlook, Microsoft Outlook Express, Qualcomm Eudora