Events in Outlook

Some of the events exposed in Outlook are application-level events, which are automatically available in the ThisOutlookSession module. These events are associated with the Outlook application or with top-level objects in the application. You can write VBA procedures to respond to these events, as needed. A description of these events follows.

ItemSend occurs whenever an item is sent, either by the user or by the Send method. The syntax is

Sub Application_ItemSend(Item As Object, Cancel As Boolean)

Item is a reference to the object being sent. Cancel is initially False. If code in the event procedure sets it to True, the send operation is cancelled.

Using Events

Remember that, like other Office applications, you must declare ...

Get Office® XP Development with VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.