MailItem.AttachmentAdd Event
Outlook Developer Reference |
Occurs when an attachment has been added to an instance of the parent object.
Syntax
expression.AttachmentAdd(Attachment)
expression A variable that represents a MailItem object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Attachment | Required | Attachment | The Attachment that was added to the item. |
Example
This Visual Basic for Applications (VBA) example checks the size of the item after an attachment has been added and displays a warning if the size exceeds 500,000 bytes. The sample code must be placed in a class module such as ThisOutlookSession
, and the TestAttachAdd()
procedure should be called before the event procedure can be called by Microsoft Outlook.
Visual Basic for Applications |
---|
|
See Also