Outlook 2003 first email open problem

A

Andy Larter

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 
A

Andy Larter

Thanks Ken. It was a good suggestion but it still seems to be too
early. The body is still being replaced.

Andy.
 
K

Ken Slovak - [MVP - Outlook]

There has to be something else going on then. I've never seen Outlook behave
differently in this respect for the first email opened up and later ones.

Is this with WordMail only or the Outlook editor only or with either editor?
Anything like message format causing any differences (HTML, plain text,
RTF)?
 
A

Andy Larter

We are currently not suporting WordMail (this will be added in the
next version). The problem is exactly the same for plain text, HTML,
and rich text.
 
K

Ken Slovak - [MVP - Outlook]

Well, I've still never seen that behavior in any of my addins so something
else must be going on.
 

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