I have used the following code to identify a filepath, in the body of an email.
The displayed string of text can be added to the address bar in windows explorer, which works fine. However I would like to have this displayed as a hyperlink in the email body, and displayed as a cell value.
So in this instance the cell value of "B11" would be "1/2024" which would be displayed in the email body as a hyperlink, which when clicked would open a folder at address "C:\blah blah"
I have used a https\\: address which displays the full filepath as a hyperlink, however, it utilises sharepoint not explorer, and the full filepath is displayed, not the specified cell value.
Any assistance would be appreciated.
VBA Code:
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "C:\TEMPLATE"
On Error Resume Next
With OutMail
.To = "firstname.lastname@emailaddress"
.Subject = "Testing URL"
.HTMLBody = strbody
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
The displayed string of text can be added to the address bar in windows explorer, which works fine. However I would like to have this displayed as a hyperlink in the email body, and displayed as a cell value.
So in this instance the cell value of "B11" would be "1/2024" which would be displayed in the email body as a hyperlink, which when clicked would open a folder at address "C:\blah blah"
I have used a https\\: address which displays the full filepath as a hyperlink, however, it utilises sharepoint not explorer, and the full filepath is displayed, not the specified cell value.
Any assistance would be appreciated.