Discussion:
Inspector Activate Problem
(too old to reply)
Alex
2010-07-09 06:03:32 UTC
Permalink
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,
--
______________________________________
Posted from http://outlook-center.com
Outlook forums, articles, tips.
Ken Slovak
2010-07-09 13:17:34 UTC
Permalink
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().
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
Post by 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,
--
______________________________________
Posted from http://outlook-center.com
Outlook forums, articles, tips.
Loading...