How to create an HTML Post message?

R

Reggie

I am creating the post messages successfully by setting the HTMLBody to my
HTML text and setting the body format flag to HTML, but when I view the
posts in Outlook, they are converted to Word style HTML. Much larger
HTML with all the Word font stuff included and the messages are not
rendering correctly. What is converting the HTML text to Word style HTML
and how can I avoid it?

Thanks
Reggie
 
K

Ken Slovak - [MVP - Outlook]

Are you using Word as your email editor? Try using the Outlook email editor.
 
R

Reggie Burnett

Ken said:
Are you using Word as your email editor? Try using the Outlook email editor.
I sincerely apologize if this is something that should be obvious. In
case it makes a difference, I am writing an add-in in C#. How do I set
the email editor?

-reggie
 
K

Ken Slovak - [MVP - Outlook]

C# or any other language I don't know of any way to force a change in
editors using code. Inspector.EditorType is read-only, as are the other
editor related properties. There's no method to change the editor and the
setting that gets changed when you change editors is in the registry. I
suppose you could change that registry setting and see if that makes a
difference in the next email you open or compose.
 
R

Reggie Burnett

Ken said:
C# or any other language I don't know of any way to force a change in
editors using code. Inspector.EditorType is read-only, as are the other
editor related properties. There's no method to change the editor and the
setting that gets changed when you change editors is in the registry. I
suppose you could change that registry setting and see if that makes a
difference in the next email you open or compose.
Can I use a different MessageClass to cause the post to keep it's HTML
rendering? I have seen commercial addins that support things like NNTP
that work no matter what editor setting is in play. I'm not
programmatically bringing up any type editor window or bringing up the
post in a window. I am just creating folders in my .pst file, creating
POST items, setting their HTMLBody text, and posting them into that
folder. Using the debugger, I can see that the HTML text that I am
setting is ok, but when I inspect the POST item (after posting), the
HTMLBody property has all the relevant elements of my HTML but it has
been "reformatted" in Word style. Any more thoughts?

-reggie
 
K

Ken Slovak - [MVP - Outlook]

No other thoughts. You'd have to play around and experiment.

And please keep your posts to the newsgroups. I do not answer private emails
about threads posted in the newsgroups.
 
R

Reggie Burnett

Ken said:
No other thoughts. You'd have to play around and experiment.

And please keep your posts to the newsgroups. I do not answer private emails
about threads posted in the newsgroups.
My apologies. I was just hitting reply all and your email was getting
included.


-reggie
 

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