outlook2003, accessing email message body with images

  • Thread starter Thread starter Krishna
  • Start date Start date
K

Krishna

Hi,
I am trying to access the message body of an email when the message has
an embedded image, something like when the user does a copy-paste of an
image from microsoft word to into outlook email message body.

Outlook 2003 and C# plug-in.

Say to start with, I am using word as my default html editor.
What I observed was this:

say variable mi is my current mail-item.

if i say mi.HTMLBody += "12345", 12345 is added at the end of the
message and the image is also shown in-place when i receive this email.

if i say mi.Body += "12345", the image is transformed as an attachment,
and the body text, 12345 is added at the end. If i touch mi.Body, the
image is made as an attachment when I receive the email. But, the
length of mi.Body is actually the length of plain-text only! I can't
find any relation to the embedded image and mi.Body.

I have to access and change both mi.HTMLBody and mi.Body for my
application, which works good when there are no images. But, fails when
there is an image in the messagebody, as i am unable to find out where
the embedded image is stored.

Can someone help me with this issue. Any help/suggestion is
appreciated.
Thanks,
Krishna.
 
I was able to figure out easily that the image is sent as an
attachment, but without the attachment clip.

The problem is when does outlook actually shows the image in-line.
On mailitem send event, i replace all the message text and on mail-item
open event, i do the reverse process, which works good for text based
emails.

When the email contains image, i get the red-cross mark instead of the
image.

Any suggestion/help is appreciated.

Thanks,
Krishna.
 
Back
Top