C
Chadersmith
Hi Guys,
I'm fairly new to VBA so this should be an easy fix. I am trying to include
a network link in the body of an email that is being generated in VBA.
I specifically want to make \\server\file a direct link or hyperlink to a
specific network location. I can't seem to figure out how to do it.
Thanks for your help.
Below is the code:
Sub EmailEE()
'
'Working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
strbody = "body of email" & vbNewLine & vbNewLine & _
"\\server\folder" & vbNewLine & vbNewLine & _
"Thank You," & vbNewLine & _
"Me"
On Error Resume Next
With OutMail
..To = "(e-mail address removed)"
..CC = "(e-mail address removed)"
..BCC = ""
..Subject = "whatever"
..Body = strbody
..Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
I'm fairly new to VBA so this should be an easy fix. I am trying to include
a network link in the body of an email that is being generated in VBA.
I specifically want to make \\server\file a direct link or hyperlink to a
specific network location. I can't seem to figure out how to do it.
Thanks for your help.
Below is the code:
Sub EmailEE()
'
'Working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
strbody = "body of email" & vbNewLine & vbNewLine & _
"\\server\folder" & vbNewLine & vbNewLine & _
"Thank You," & vbNewLine & _
"Me"
On Error Resume Next
With OutMail
..To = "(e-mail address removed)"
..CC = "(e-mail address removed)"
..BCC = ""
..Subject = "whatever"
..Body = strbody
..Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub