Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Excel VBA - Outlook Html body hyperlink

Posted on 2014-04-08
6
Medium Priority
?
2,574 Views
Last Modified: 2014-07-10
Hi
I am sending an email using Excel VBA via Outlook
I want to use an html body with a hyperlink
I tried the following hoping that the hyperlink would naturally work but it doesn't

 oMsg.HTMLBody = "<html><body><font size=3  color=red>Automated invoicing powered by www.online-excel.co.za</font></body></html>"
0
Comment
Question by:Murray Brown
[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
  • 2
  • 2
6 Comments
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 39985269
oMsg.HTMLBody = "<html><body><font size=3  color=red>Automated invoicing powered by <a>www.online-excel.co.za</a></font></body></html>"
0
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 2000 total points
ID: 39985273
oMsg.HTMLBody = "<html><body><font size=3  color=red>Automated invoicing powered by <a href=www.online-excel.co.za>www.online-excel.co.za</a></font></body></html>"
0
 

Author Closing Comment

by:Murray Brown
ID: 39985293
Thanks very much
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Expert Comment

by:Jaes Overley
ID: 40188677
I see that this question was already answered, but the HTML code should have quotes around the hyperlink reference URL. In order to do that in Excel VBA always use two double quotations around any quoted items within a string.

oMsg.HTMLBody = "<html><body><font size=3  color=red>Automated invoicing powered by <a href=""www.online-excel.co.za"">www.online-excel.co.za</a></font></body></html>"
0
 

Author Comment

by:Murray Brown
ID: 40188941
Thanks for the extra help
0
 
LVL 1

Expert Comment

by:Jaes Overley
ID: 40188957
No problem. It may not be an issue in this case, but at some point you might need to put quotes in your HTML string within VBA and would need this extra bit of information.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

609 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