MapiGetMessageAttachment Function

Action

Retrieves information about a message attachment. Getting the property value of MAPI_PROP_MSG_ATTACH_COUNT will retrieve the number of recipients. The attachment ID's are 0 based.

Include file

Mapi.bdh

Syntax

MapiGetMessageAttachment( in hMessage     : number, 
                          in nAttachmentID: number, 
                          in bFileOrPath  : boolean, 
                          in sAttachment  : string ) : boolean;
Parameter Description
nMessageID Valid MAPI Message Handle
nAttachmentID ID of the attachment that should be retrieved. This needs to be a value between 0 and MAPI_PROP_MSG_ATTACH_COUNT-1. The ID is 0 based! So - the first attachment has ID 0 - the second one 1, …
bFileOrPath

True to retrieve the filename of the attachment.

False to retrieve the full path of the attachment.

sAttachment Filename or Full Path of the Attachment.

Return value

  • true if successful
  • false otherwise

Example

See MAPI Sample