Reputation: 616
I am working on Outlook Add-In project. Is there any event or something that Outlook has been shut down?I need to call a service method just before outlook has been closed.
Upvotes: 1
Views: 1827
Reputation: 11324
Yes, you can make use of the Quit event of the Application object.
The Quit
event is fired when Outlook
begins to close.
C# example:
((Outlook.ApplicationEvents_11_Event)Application).Quit
+= new Outlook.ApplicationEvents_11_QuitEventHandler(ThisAddIn_Quit);
void ThisAddIn_Quit()
{
MessageBox.Show("Ciao!");
}
Copied from here.
Note:
There are some additional hints for Shutdown for Outlook 2010 Add-In developers here.
Upvotes: 3