MailItem.Unload Event (Outlook)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Occurs before an Outlook item is unloaded from memory, either programmatically or by user action.

expression .Unload

expression A variable that represents a MailItem object.

This event occurs after the Close event for the Outlook item occurs, but before the Outlook item is unloaded from memory, allowing an add-in to release any resources related to the object. Although the event occurs before the Outlook item is unloaded from memory, this event cannot be canceled.

Note Note

This event is meant only as a notification event, so that an add-in can dereference the object. An error occurs if any property or method for this object is called within the Unload event.

Show: