Try to store applicationObject.Inspectors as a class variable and set up the
events as:
m_inspectors = applicationObject.Inspectors;
m_inspectors .NewInspector += new
Outlook.InspectorsEvents_NewInspectorEventHandler(NewInspectorMethod);
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"David Schwartz" <(E-Mail Removed)> wrote in message
news:072101c3c470$95efae40$(E-Mail Removed)...
> I wrote a C# COM add-in based on the sample from MSDN.
> In OnConnection() I sign up for the
> applicationObject.Inspectors.NewInspector event using the
> following code:
> applicationObject.Inspectors.NewInspector +=
> new Outlook.InspectorsEvents_NewInspectorEventHandler
> (NewInspectorMethod);
>
> At some point I stop getting this notification.
> To be more specific, when I open a new meeting request, I
> add some buttons to the command bar, and when I open one
> of my forms, by pressing these buttons, I stop getting
> the NewInspector event.
> I've checked that I don't have any unhandled exceptions
> in my code, so I don't think that my code caused the add-
> in to unload.
>
> Is this a known issue? if so, is there anything I can do
> to solve it?