Solved

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

Posted on 2008-10-08
3
1,489 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 125 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
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…

729 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