[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Converting a rich text email body to an html format in Outlook VBA

Posted on 2008-10-08
3
Medium Priority
?
1,508 Views
Last Modified: 2013-11-30
I have written a VBA routine in Outlook VBA that generates the rich text format body of an email, that is ultimately successfully sent as a mail item. Contained in the body of that email is a link to another html form that I have developed.

That html form I am referencing via link within my email body has a number of parameters built int it. At the end of the day, the URL is quite long and an eyesore to the user receiving the email.

My ultimate objective would be change the display name of the link in the body of my rich text email to something other than just the URL... but to the best of my knowledge, this is not possible in rich text.

Is there a way to programmatically change the email body from rich text to html, then send the email as "olformatHTML". Once I've gotten it into an html format, I can do some simple find and replace work to associate the display name with the link. I just don't want to have to build a routine to generate html.

Again, my canvas is Outlook VBA.

Kind regards,

Dan
0
Comment
Question by:doshoss
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 500 total points
ID: 22675935
mymailitem.bodyformat = olformathtml

does it nicely

Chris
0
 

Author Closing Comment

by:doshoss
ID: 31504538
Chris,

Thanks... all my reading on the internet lead me to believe that this would NOT perform an actual conversion of format, but in fact it does. Now that I've got this into an html format, I will need to address the issue of putting a display name on my link. Aside from a brute force find and replace of the html body, is there a collection I can work with to edit the link in my email body?

Dan
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 22681053
I'm not very up on HTML conversions but there are routines out there that do it, can't recall one off hand but if the text is converted to HTML and stuffed into the HTMLbody then a simple substitution should do it.

Chris
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question