Attachment Object

Description

Represents a document or link to a document contained in an Outlook item.

Using the Attachment Object

Use Attachments(index), where index is the index number, to return a single Attachment object.

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"
Properties

Application property, DisplayName property, FileName property, Parent property, PathName property, Position property, Type property.

Methods

Delete method, SaveAsFile method.