How to attach a handler when the user is closing outlook?
private void ThisAddIn_Shutdown(object sender, System.EventArgs e) basicly doesn't work.
in here: VSTO Outlook integration - Outlook shutdown event for synchronization
I've found a suggestion to hook up to Explorer.Close() and Inspector.Close().
In here: http://social.msdn.microsoft.com/forums/en-US/vsto/thread/7e3c3a98-2b01-4def-a83c-f560e4672e73
Helmut is attaching a handler like this:
_Inspector = inspector as Outlook.InspectorClass;
// register for the close event - used to release ourself from memory - intercept the close event
_Inspector.InspectorEvents_Event_Close += new Outlook.InspectorEvents_CloseEventHandler(_Inspector_InspectorEvents_Event_Close);
but there is no way I could repeat it on my machine (maybe it's my newer outlook...)
Anyone could help?