How do I use IConnectionPoint to capture the "Forward As Attachment" event?

103 Views Asked by At

In this article, How to detect Outlook Events ..., Dmitry Streblechenko outlines how to subscribe to Outlook Events not listed in the TypeLibrary.

Would these be the steps to follow?

  1. Use some Ole Viewer to locate the GUID of the object in question.
  2. Pass that GUID to IConnectionPointContainer in order to retrieve an IConnectionPoint object.
  3. Call Advise / UnAdvise (etc.)

Does that look about right? Does anyone have any sample code?

1

There are 1 best solutions below

0
Dmitry Streblechenko On BEST ANSWER

ItemEvents_10 GUID to pass to IConnectionPointContainerFindConnectionPoint is {0006302B-0000-0000-C000-000000000046} (you can see it in OutlookSpy - I am its author). ItemEvents is {0006303A-0000-0000-C000-000000000046}