Hello kuraitori,
You need to need to use HTML to include the hyperlink. Here is an example that provides a link to Google...
Sub EmailWithHyperlink()
Dim refLink As String
Dim MyApp As Boolean
Dim olApp As Object
Dim olEmail As Object
Dim URL As String
'Outlook constants aren't available using late binding
Const olMailItem = 0
'Open or Start a new instance of Outlook
On Error Resume Next
Set olApp = GetObject(, "Outlook.Application")
If Err = 429 Then
MyApp = True
Set olApp = CreateObject("Outlook.Application")
End If
On Error GoTo 0
olApp.Session.Logon
'URL to Google
URL = Chr$(34) & "http://www.google.com/" & Chr$(34)
'Create HTML Hyperlink
refLink = "<a href=" & URL & ">Link to Google</a>"
'Create an Outlook Mail Item
Set olEmail = olApp.CreateItem(olMailItem)
With olEmail
.To = "LeithRoss@gmail.Com"
.Subject = "Hyperlink test"
.HTMLBody = "This message hyperlink " & refLink & " will take you to Google."
.Send
End With
olApp.Session.logoff
If MyApp Then olApp.Quit
'Release Objects
Set olApp = Nothing
Set olEmail = Nothing
End Sub
Sincerely,
Leith Ross
Bookmarks