How to Hyperlink in an email?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code below that creates an outlook email. I need to
hyperlink the holder variable how can I do this in VBA?

Sub Send_Msg()

Dim objOL As New Outlook.Application
Dim objMail As MailItem
Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)

holder = "\\server\share"
With objMail
.To = "(e-mail address removed)"
.Subject = "Test Email"
.Body = holder
.Display
'.Send
End With

Set objMail = Nothing
Set objOL = Nothing

End Sub
 
In the hyperlink it has the word file in it
file:\\Server\share
And when I tried to click because it has the file: in there the hyperlink
does not work.
 
Back
Top