You should be handling Inspectors.NewInspector() and instantiating an
Activate() handler for that new Inspector. Why are you then getting
ActiveInspector() which most likely will not point where you want until
after the Activate() event fires?
--
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
"chris" wrote in message
...
Thanks for the reply!
I have tried putting the code in the Activate event handler, but I can see
the item selected only on the rest of the of the times when the Activate
is
executed, not on the first one. Am I not picking up the Current Inspector
correctly?
void Inspector_Activate()
{
Outlook.MailItem email =
(Outlook.MailItem)Globals.ThisAddIn.ActiveInspecto r().CurrentItem;
Outlook.ItemProperty item =
(Outlook.ItemProperty)email.ItemProperties["myId"];
if(item != null)
{
// code here
}
}
Thanks!