7. Working with Word Events
Events in the Word Object Model
Understanding the events in the Word object model is critical, because this is often the primary way that your code is run. This chapter covers all the events in the Word object model, when they are raised, and the type of code you might associate with these events.
Some of the events in the Word object model are repeated on the Application and Document objects. This repetition allows you to decide whether you want to handle the event for all documents or for a particular document. If you want to know when any document is closed, for example, you would handle the Application object’s DocumentBeforeClose event. If you want to know when a particular document is closed, you would handle ...
Get Visual Studio Tools for Office: Using Visual Basic 2005 with Excel, Word, Outlook, and InfoPath 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.