Outlook.HTMLBODY

F

free70

Hi there,
I have written a we app using Visual Studio 2005 and the Office interops.
All works fine and happy generally although have an issue with the
OUTLOOK.HTMLBODY.....

Basically, the program is meant to create emails, and them save them for
sending when user is ready.

Everything works although I have now had to change the body of the email to
include HTML formatting.

Problem is when the messages are opened in Outlook my styling does not work.

My styles are still there, but Outlook as put a load of extra ones in the
header and the actual email formatting does not mirror what I created.

How can I stop Outlook adding these extra styles, or perhaps more
importantly is there any issues around using html in the body that I am not
aware of?

FYI: The HTML I am using in the Body is valid html that I took from a custom
email template that Outlook has no problems with (when I use it as a template
for emails that I do not create programatically)

Any ideas or pointers?

Thanks in advance

Geoff
 
K

Ken Slovak - [MVP - Outlook]

Outlook does change HTML in HTMLBody when an item is sent out or replied to.
If WordMail is being used then the HTML is altered by Word and if you get a
conversation where Outlook editor and WordMail are emailing to each other
then the HTML gets really interesting and not at all like what you created.
Not much you can do about it other than trying to minimize the amount of
fancy formatting you're doing and experimenting with what gets preserved in
your formatting and using that.
 
F

free70

Thanks Ken,

I thought maybe I was missing something so couldnt understand the formatting.

I have taken your advice and 'played' with formatting to see what works and
what doesn't and I have managed to create the HTML body pretty much as I need.

Thanks for the advice
 

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