Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to trap events exposed by Office applications


View products that this article applies to.

This article was previously published under Q238983

↑ Back to the top


Summary

You can trap events that are exposed by Microsoft Office applications by implementing the event interface you want to catch (the "sink"), and setting up an advisory connection with the application (the "source").

↑ Back to the top


More information

To set up the advisory connection, you get the server's IConnectionPointContainer and call FindConnectionPoint() with the IID of the event interface. This gives you an IConnectionPoint interface. Then call Advise() with an instance of your event interface. The server will call back through this interface when these events occur.

↑ Back to the top


References

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
183599� How to catch Word application events by using Visual C++

↑ Back to the top


Keywords: kbfaq, kbhowto, KB238983

↑ Back to the top

Article Info
Article ID : 238983
Revision : 8
Created on : 5/11/2007
Published on : 5/11/2007
Exists online : False
Views : 470