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

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?



Solution 1:[1]

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}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1