"OnConnection" and "OnDisconnection". After moving all the stuff into
a "gBaseClass" and using "InitHandler" und "UnInitHandler" the right
way it now works like a charm. Thanks again...
You'll find that by the time On_Disconnection fires that all Outlook objects
are out of scope. In fact, in a COM addin where Outlook is closed by the
user the On_Disconnection event won't even fire while any Outlook objects
haven't been released. It will fire after the UnInitHandler because at that
time all the Outlook objects have been released.
The exception to that rule is the case of RemoveMode = ext_dm_UserClosed,
then On_Disconnection will fire even if Outlook objects haven't been
released.
This problem is a famous Catch-22 with Outlook addins, On_Disconnection
won't fire unless all your Outlook objects have been released. That's why
the method shown in the ItemsCB COM addin sample on the Resources page at
www.microeye.com was developed to monitor the closing of Explorers and
Inspectors to know when to release the Outlook objects.

Signature
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
> Hi Ken,
>
[quoted text clipped - 7 lines]
>
> > !!! EMail??? Please use Reply-To address and remove underscores (_) !!!
Heinz-Josef Bomanns - 30 Nov 2004 15:30 GMT
Hi Ken,
>[...] On_Disconnection event won't even fire while any Outlook objects
>haven't been released [...] The exception to that rule is the case of
>RemoveMode = ext_dm_UserClosed, then On_Disconnection will fire even if
>Outlook objects haven't been released [...] ItemsCB
Thanks for sharing this comprehensive infos, it's much appreciated -
step by step i'm getting into all this do's and dont's ,-)

Signature
So long...
...Bomi
> !!! EMail??? Please use Reply-To address and remove underscores (_) !!!