I'm using the 12.0 Interop library, which is the default for Outlook 2007. I'm actually aiming for Outlook 2003 to 2010 integration with a code example that registers to a quit event.
Even though the docs say that there is an application Quit event for the Outlook app, I can't find it in the Outlook.Application
object implementation.
Visual Studio 2010 seems to identify Quit
as a method:
Question:
How would one register to the Outlook application's Quit event? (if there is one, or any event that is triggered when the application quits) If possible provide some example code.
Thanks!
Process.Exited
event as mentioned by Tigran. – FormanQuit
method and theQuit
event, both of which are defined on separate interfaces. The method shadows the event, and you have to explicitly cast the Application object to theMicrosoft.Office.Interop.Outlook.ApplicationEvents_11_Events
interface to access the event. – Ludhiana