AttachmentRead Event

Microsoft Outlook Visual Basic

AttachmentRead Event

       

Occurs when an attachment in an item has been opened for reading.

Sub object_AttachmentRead(ByVal Attachment As Attachment)

object   An object that evaluates to one of the objects in the Applies To list. In VBScript, use the word Item.

Attachment   Required. The Attachment that was opened.

Example

This VBScript example reminds the user to also save changes to the original of an embedded file.

Sub Item_AttachmentRead(ByVal ReadAttachment)
    If ReadAttachment.Type = 1 then
        MsgBox "If you change this file, save your changes to the original as well."
    End If
End Sub