Insert HTML code into email body?

I want to insert things like this in my email body

 

<b> This is bold</b>

<em>This is italics</em>

 

and then when the recipient gets it, it would be bold, italic, etc.  Is there a way to do this?  Thanks

 

 

If you really need to insert the html tags yourself, you'd need to do it by code. If you just want to format your message, see Options/Format, there switch to html. Then you have all the formatting options available.
Outlook Add-Ins & VBA Macros
www.vboffice.net

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Robert Sparnaaij [MVP-Outlook]
https://www.howto-outlook.com
https://www.msoutlook.info

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

I am generating emails from a Progress program (Progress is a database language.)  I want to make the body of the email formatted with bold, italics, etc.  I thought if I could put in html code it would do this. 

 

When I select html doing the email manually, the receipient sees the html code and not the bolding.  So I do not see much hope in this approach.

 

Thanks anyway.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

So you are using the Outlook Object Model to create the emails? Then you need to use the HTMLBody property.


You can paste the code below in your VBA Editor in Outlook (ALT+F11) to see how it works.


Sub HTMLMessage()

   Dim objOutlookMsg As Outlook.MailItem
   Set objOutlookMsg = Outlook.Application.CreateItem(olMailItem)
   objOutlookMsg.HTMLBody = "<html><body><strong>bold text</strong></body></html>"
   objOutlookMsg.Display

End Sub


If you already have the html-file, then you can use the Insert As Text method as indicated in:
http://www.msoutlook.info/question/26

Robert Sparnaaij [MVP-Outlook]
https://www.howto-outlook.com
https://www.msoutlook.info

2 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

 
 

Question Info


Last updated June 4, 2020 Views 4,557 Applies to: