hello, I was wondering how to imbed a hyperlink into the body of an automatically generated email.
Ideally the hyperlink would be based on a cell value to allow a user to cut and paste a file path
example filepath
P:\Project Folder\project worksheet.xls
Here is the current autoemail VBA code I am using. So the filepath would be taken from
Sheet: Behind The Scenes D4
Private Sub SimplifiedEmail_Click()
Dim myOutlok As Object
Dim myMailItm As Object
Set otlApp = CreateObject("Outlook.Application")
Set otlNewMail = otlApp.CreateItem(olMailItem)
fName = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
With otlNewMail
.To = Sheets("Behind The Scenes").Range("D2")
.Subject = Sheets("Behind The Scenes").Range("D3") & " " & Sheets("Behind The Scenes").Range("E3")
.Body = Sheets("Behind The Scenes").Range("D5") & " " & Sheets("Behind The Scenes").Range("D6") & Chr(10) & Sheets("Behind The Scenes").Range("D7")
.Send
End With
otlApp.Quit
Set otlNewMail = Nothing
Set otlApp = Nothing
Set otlAttach = Nothing
Set otlMess = Nothing
Set otlNSpace = Nothing
End Sub
Bookmarks