Inspector Activate Problem


A

Alex

In my appointment ribbon I have the following code that adds an event
handler to listen for inspector activate events.

private void AppointmentRibbon_Load(object sender, RibbonUIEventArgs)
{
m_inspector = (Outlook.Inspector)Context;
((Outlook.InspectorEvents_10_Event)m_inspector).Activate += new
Microsoft.Office.Interop.Outlook.InspectorEvents_10_ActivateEventHandler(AppointmentRibbonInspector_Activate);

}

The problem is that on some machines it appears that the Inspector
Activate function has already been triggered before the appointment ribbon
is loaded.
How do I get around this problem?

Thanks,
 
Ad

Advertisements

K

Ken Slovak

Use the Inspectors.NewInspector() event to listen for a new Inspector being
opened. Set the Activate() handler for that Inspector in that event, or in a
wrapper class if you are using Inspector wrappers.

That will work except where the Inspector is opened using Simple MAPI (Send
To), which adds the Inspector to the Inspectors collection, but it never
fires NewInspector().
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top