• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 936
  • Last Modified:

VBA Code Email link with Body HTML?

From MS Access vbs is it possible to make the url a html hyperlink?

I would assume that the modification would be in the bode= section


MY current code that works...
Just want it to say "Click Here" instead of the whole url.

'Add client email
strMailTo = "mailto:" & Me.Parent.email

'Add Subject Field
strMailTo = strMailTo & "&subject=Your%20Account%20Team"


'Add Body Field
strMailTo = strMailTo & "&body=http://www.mydomain.net/Videos/ClientVideo.aspx%3Fq=" & cid

Application.FollowHyperlink strMailTo

Open in new window

0
lrbrister
Asked:
lrbrister
  • 3
  • 3
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
If you're sure that you're sending an HTML formatted email, you can do this:

 strMailTo & "&body=<a href="http://www.mydomain.net/Videos/ClientVideo.aspx">Click Here</a>%3Fq=" & cid

However, I don't think your current code will work for that. You'll almost certainly have to automate Outlook for that. Here's a link for doing that:

http://msdn.microsoft.com/en-us/library/office/aa159619(v=office.11).aspx

That's for 2003, but will work for any version.
0
 
lrbristerAuthor Commented:
Lsm...
The link is fine but I need to send it to a particular email address...not someone in my Contacts List.

Looks like I need to use the ".To" code but I can't find how to include all the argumets for that
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I don't follow - you asked how to make the url a html hyperlink, and your followup doesn't seem to have anything to do with that.

Can you explain further? Do you mean that you need to send the email to a static address, like:

'Add client email
strMailTo = "mailto:someone@somewhere.com"
0
Technology Partners: 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!

 
lrbristerAuthor Commented:
LSM...
Yes
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Then just do as I suggested - set the value of strMailTo to your static value.
0
 
lrbristerAuthor Commented:
Thanks
0

Featured Post

Technology Partners: 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!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now