Partager via


Available events and their dispids (Outlook Exported APIs)

This section describes the dispatch identifiers for the events that Outlook makes available.

Outlook exposes the following dispatch identifiers (dispids) to allow C++ add-ins to listen to and handle the corresponding events from the IDispatch::Invoke function.

Constant Dispid for event Description Parameters Remarks

dispidBeforePrint

0xFC8E

Used to handle the application–level event from the IDispatch::Invoke function that fires before a printing operation.

There are 2 unnamed parameters:

  • The first parameter is of the type VT_BOOL|VT_BREF. Return VARIANT_TRUE in this parameter to cancel the event.

  • The second parameter is not used and should be ignored.

dispidEventReadComplete

0xFC8F

Used to handle the item-level event from the IDispatch::Invoke function that fires when Outlook has completed reading the properties of the item.

There is only one parameter Cancel which is of the type VT_BOOL|VT_BREF. Return VARIANT_TRUE in this parameter to cancel the read operation.

This event corresponds to the Exchange Client Extensions (ECE) event IExchExtMessageEvents::OnReadComplete.

For an example of how to use a dispid to listen to and handle an event, see the CAppEventListener::Invoke function in the C++ Outlook solution described in Implementing Outlook 2002/XP Event Sinks in MFC C++ 2003 .NET.

See also

Outlook Exported APIs
Constants (Exported Outlook APIs)
About APIs Exported by Outlook

Implementing Outlook 2002/XP Event Sinks in MFC C++ 2003 .NET