[Okta Webinar] Learn how to a build a cloud-first strategyRegister 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,513 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
  • 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

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.
Check out the latest tech news, community articles, and expert highlights in August's newsletter.
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses
Course of the Month18 days, 21 hours left to enroll

834 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