Attachments object


Attachments collection represents the attachments of a message..


Returned by:






Derived from: IDispatch


Application Returns Outlook.Application object
Class Always returns 18 (olAttachments).

integer, read-only. The number of attachments in the Attachments collection.



MAPITable, read-only. Returns the MAPITable Redemption object which can be used to manipulate the collection (restrict, find, etc).



Parent. Read-only.


RawTable IUnknown, read-only. Returns the IMAPITable Extended MAPI interface used internally by the Items collection.
Session Returns Outlook.Namespace object.


Add(Source, Type, Position, DisplayName)

Adds a new attachment. Returns Attachment object.

Source - either a string specifying the fully qualified path to the file to be attached (fully qualified HTTP or HTTPS urls are allowed), a message (RDOMail object), an attachment from another message (Attachment object), or a variant array of bytes (assumed to be the raw attachment data).

If Source is a string, an error will be raised if the file does not exist or cannot be accessed.

Type - integer, optional. One of the OlAttachmentType enums - olByValue (1), olByReference (4), olEmbeddeditem (5)

Position - integer, optional. Position of the attachment in the message body. Only applies to the messages in the RTF format.

DisplayName - string, optional. Attachment display name. Warning - as of Outlook 2002 SP3, Outlook always displays the file name instead of display name for security reasons.


Retrieves an attachment with a given index (1 to Count).

Returns Attachment object

Index - integer.




Removes an attachment with an index given by the Index parameter (integer, 1 through Count).