ref: vbMAPI_Attachments

On this page you'll find:

Overview

Equivalent MAPI object: IMAPITable
Equivalent Outlook Redemption object: Redemption.RDOAttachments
Equivalent Outlook Object Model object: Outlook.Attachments
Parent: vbMAPI_MailItem

Class Description

This object represents a collection of vbMAPI_Attachment objects. Preferably, use the For-Each syntax to enumerate the collection.


Property Get Count() As Long

Returns the count of items in this collection.

Property Get Item(ByVal IndexOrName As Variant) As vbMAPI_Attachment

Returns the item in the collection corresponding to the provided Index (Long) or Name (String).

Function Add(ByVal Source As String, _
              Optional ByVal Type As EnumAttachmentMethod = AttachmentMethod_ByValue, _
              Optional ByVal Position As Long = &Hffffffff, _
              Optional ByVal DisplayName As String) As vbMAPI_Attachment

Adds a new attachment to this collection.  Source: Path to the file.

Function AddBlank(ByVal DisplayFilename As String, _
              Optional ByVal Position As Long = &Hffffffff, _
              Optional ByVal DisplayName As String) As vbMAPI_Attachment

Adds a new, blank attachment to this collection.  Use vbMAPI_Attachment.DataAsText to write data into the attachment.

Property Get Session() As vbMAPI_Session

Returns the session object associated with this object.