I found this code online but when It runs and I click on link on the email it says we cannot find it. Is it because its on the network drive? I have access to this drive and file location but it does not work. I have to be missing something here. Anyone ever encountere dthis?
Sub MailURL()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<A href=J:\Clinic Consolidation\Daily Visit File.xlsm" & ">Daily Visit File</A>"
On Error Resume Next
With OutMail
.To = ""
.Subject = "Testing URL"
.HTMLBody = strbody
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Bookmarks