?
Solved

Excel VBA - Outlook Html body hyperlink

Posted on 2014-04-08
6
Medium Priority
?
2,444 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
Independent Software Vendors: 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!

 
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

Independent Software Vendors: 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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

762 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