Add
Overview
The Add method creates and adds a new Attachment object to the Attachments object collection.
Syntax
| Parameter Name | Required/Optional | Type | Description |
|---|---|---|---|
| Source | Required | Variant | The file path for the new attachment |
| AttachmentType | Optional | olAttachmentType | The type of attachment. |
| Position | Optional | Long | The position of the image within the email |
| DisplayName | Optional | String | The display name of the attachment |
Return Value
Returns a newly created Attachment object with the specified parameters.
Example
Example code snippet demonstrating how to add an attachment: