Try waiting until the first Inspector.Activate event fires before making the
change and see what happens. Set a flag in that code so it won't run again
if the Inspector becomes deactivated and then re-activated.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Andy Larter" wrote in message
...
Hi,
I'm having a problem with my Outlook 2003 addin.
My addin is required to process e-mails before the user reads the
text. When a new inspector is opened, my addin examines the body text
and if necessary processes the text and stores the result back into
the Body member.
This works fine for most of the time. Unfortunately it seems that
Outlook is replacing my body text when the first email is read. The
new inspector event gets fired, my processing runs and replaces the
body but by the time the email is displayed, the original text is back
in the Body member. After the first mail item is opened, the addin
works fine.
Can anyone suggest a work around for this problem? If I execute my
code in response to a toolbar button click, the processing works ok,
so at the minute I have to tell users to manually click the button the
first time they read a mail (which isn't very friendly).
Thanks in advance,
Andy