Attachments Collection Object

Description

A collection of Attachment objects that represent the attachments in an Outlook item.

Using the Attachments Collection

Use the Attachments property to return the Attachments collection for any Outlook item (except notes).

Use the Add method to add an attachment to an item. The following example creates a new mail message, attaches a Q496.xls as an attachment (not a link), and gives the attachment a descriptive caption.

Set myItem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
myAttachments.Add "C:\My Documents\Q496.xls", _
    olByValue, 1, "4th Quarter 1996 Results Chart"
Use Attachments(index), where index is the index number, to return a single Attachment object.

Properties

Count property, Parent property.

Methods

Add method (Attachments collection), Item method, Remove method.