plain text with BodyFormat HTML not showing correctly


N

Nagaraj

Hi,

I have a plain text

plain
<a href=http://localhost:8080/Aatmani/adclick?adprintid=1224>Learn how the
Mandarin Oriental Hotel give 5-Star service with PI</a>


I want to show it in the HTML format. I used the following code

mailItem.BodyFormat =
Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatHTML;

mailItem.Save();

But still I am not getting the result in the HTML format but only in the
plain format. Can anyone help me?

Thanks
 
Ad

Advertisements

K

Ken Slovak - [MVP - Outlook]

That's not valid HTML. For HTML you'd need to add quotes to the URL. Take a
look at some valid HTML to see how it looks.

An example would be the URL "http://www.slovaktech.com", which would look
like this in HTML:

<a href="http://www.slovaktech.com">http://www.slovaktech.com</a>

How are you adding that text?

If you want HTML then after making sure the BodyFormat is HTML you need to
add correct HTML to the HTMLBody property.
 

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