Calvin Nguyen
Posts: 15
Joined: 2006-09-29
|
Hello,
When the pair of 'inspector activate' events are called, what is the best way to distinguish between them?
I'll explain why I'm asking. If I open a reading inspector and click 'Reply', two 'inspector activate' events occur. The first one targets the old inspector (i.e., the mail item being replied to). The second one targets the new inspector (i.e., the one used for the 'Reply' being composed). I want code to execute only in the latter case and so I need to tell the two events apart.
Thanks,
Calvin |
|
Sergey Grischenko
Add-in Express team
Posts: 7235
Joined: 2004-07-05
|
Hi Calvin.
Please try to use the NewInspector event handler.
P.S. Note that we take up your forum requests in the order we receive them. Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
|
|
Calvin Nguyen
Posts: 15
Joined: 2006-09-29
|
Thanks, Sergey.
I should have been more specific in my previous post. I am looking to change the content of the mail item tied to the new inspector. Is this possible during NewInspector?
Trying to apply your advice, my current method is to take the 'inspector' parameter of the NewInspector event handler, cast it into an Outlook._Inspector object, access that object's CurrentItem property, and finally use the Body / HTMLBody properties to change the mail item content. All this is being done in the NewInspector event, during which it seems to work.
However when the second 'inspector activate' call occurs, I find the content has reverted back to its original state. Would you have any ideas why this is?
Thanks again. |
|
Sergey Grischenko
Add-in Express team
Posts: 7235
Joined: 2004-07-05
|
Hi Calvin.
You need to use the Save method of the mail item to save changes after the content has been changed. |
|