Detect when MS Word Has Quit After Starting an Instance of Word Application Object
Author:Intelligent Solutions Inc.
A commonly asked question is how does one detect when a user has ended Word after an instance of the Word Application object is instantiated. The answer is to declare the Word Application object with the WithEvents keyword, as illustrated by this code. A reference to the Word Object Library is required.
Instructions: Copy the declarations and code below and paste directly into your VB project.