Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VBA to Add Web Link in Outlook Email

44 views
Skip to first unread message

Sandy Winkelman

unread,
Apr 9, 2013, 1:24:40 PM4/9/13
to
I have a module that opens an email and inserts text with a link to a
website in the body. e.g.: "Click here to upload your file(s)
https://www.cwmdiecast.com" (Note: this is not the real link, it's
only used for example purposes)

I would like to have the link be embedded in the text, "Click here".
If I were to use HTML code, it would look like this: "<a
href="www.cwmdiecast.com">Click here</a> to upload your files."

I can't figure out how to do this with VBA. Here is my script as it
is now:

Sub SendLink()
'
' Include reference to Outlook library
'
Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Dim myRecipientTo As Outlook.Recipient

Set olApp = Outlook.Application
'Create e-mail item
Set objMail = olApp.CreateItem(olMailItem)
'Set myRecipientTo = objMail.Recipients.Add("Test Name")

With objMail
.Subject = "File Upload Link"
.Body = "Click here to upload your file(s) https://www.cwmdiecast.com"
.Display
End With

End Sub

How do I change it so the link is hidden in the words "Click here"?
0 new messages