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

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

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

How satisfied are you with this reply?

Thanks for your feedback.

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

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

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

How satisfied are you with this reply?

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.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

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

How satisfied are you with this reply?

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

3 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

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

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated April 10, 2024 Views 7,772 Applies to: