Sending Email via VBA

G

Guest

I'm sending an email using VBA via the code listed below. Everything works
fine, but I'd like to incorporate a hyperlink in the body of the email, which
I don't know how to do. Right now the link (text) is in the body of the
email, but i do not know how to make it a hyperlink. Any help is appreciated.

'here's my example
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
Dim strbody As String

strbody = "Please visit us at www.test.com. Thank you." 'i want the
www.test.com to be a clickable hyperlink

With OutMail
.To = "(e-mail address removed)"
.Subject = "test email"
.Body = strbody
.Display 'or use '.Send
End With

Thanks in advance,
Chad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top