Jose Zavala
Member
Members
Forum Posts: 47
Member Since:
October 25, 2017
October 25, 2017
Offline
Hi,
how can I modify the code below to change the display "Link to file" to \\mtlnas01\EFT_backup\2021\11 November 2021\ 939 1-6 NCL USD Wires Summary January 00, 1900.xlsx (to display where saved) people don't know that pointing the mouse will display the full path, much appreciated.
VBA Code:
Sub Make_Outlook_Mail_With_File_Link()
'Working in Excel 2000-2016
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
If ActiveWorkbook.Path <> "" Then
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<font size=""3"" face=""Calibri"">" & _
"Hi Lawrie,<br><br>" & _
"<br><B>" & _
ActiveWorkbook.Name & "</B> is created.<br>" & _
"Please click on this link to open the file : " & _
"<A HREF=""file://" & ActiveWorkbook.FullName & _
""">Link to the file</A>" & "</B> <br> <br>" & _
"NCL USD WIRES SUMMARY.PDF" & "</B> is saved.<br>" & _
"Please click on this link to open the backup : " & _
"<A HREF=""file://" & NetworkPath & ActiveWorkbook.ActiveSheet.Range("F3") & _
""">Link to the file</A>" & _
"<br><br>Note: The WIRES backup link is in the spreadsheet as well...." & _
"<br><br>Thank you," & _
"<br><br></font>"
On Error Resume Next
With OutMail
.To = "lawrie.coutinho@distributel.ca"
.CC = ""
.BCC = ""
.Subject = "" & Range("SUBJECT").Value 'ActiveWorkbook.Name
.Attachments.Add Application.ActiveWorkbook.FullName
.HTMLBody = strbody
.Display 'or use .Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Else
MsgBox "The ActiveWorkbook does not have a path, Save the file first."
End If
End Sub
Velouria
London or thereabouts
Moderator
Members
Trusted Members
Moderators
Trusted Members
Moderators
Forum Posts: 834
Member Since:
November 1, 2018
November 1, 2018
Offline
Use:
strbody = "<font size=""3"" face=""Calibri"">" & _
"Hi Lawrie,<br><br>" & _
"<br><B>" & _
ActiveWorkbook.Name & "</B> is created.<br>" & _
"Please click on this link to open the file : " & _
"<A HREF=""file://" & ActiveWorkbook.FullName & _
""">" & ActiveWorkbook.FullName & "</A>" & "</B> <br> <br>" & _
"NCL USD WIRES SUMMARY.PDF" & "</B> is saved.<br>" & _
"Please click on this link to open the backup : " & _
"<A HREF=""file://" & NetworkPath & ActiveWorkbook.ActiveSheet.Range("F3") & _
""">" & NetworkPath & ActiveWorkbook.ActiveSheet.Range("F3") & "</A>" & _
"<br><br>Note: The WIRES backup link is in the spreadsheet as well...." & _
"<br><br>Thank you," & _
"<br><br></font>"
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online:
Guest(s) 8
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Catalin Bombea: 1939
SunnyKow: 1432
Anders Sehlstedt: 925
Purfleet: 415
Frans Visser: 349
Hans Hallebeek: 345
David_Ng: 312
lea cohen: 248
Jessica Stewart: 219
A.Maurizio: 216
Newest Members:
Karen Brown
Arieta Salihu
Garry Miller
Shuonan Zhou
Kelly Woolum
Belinda White
Barbara White
Ross McCarty
Lisa Donaldson
Hiroyuki Murai
Forum Stats:
Groups: 3
Forums: 25
Topics: 7088
Posts: 31068
Member Stats:
Guest Posters: 49
Members: 34510
Moderators: 2
Admins: 3
Administrators: Mynda Treacy, Philip Treacy, Jessica
Moderators: Velouria, Riny van Eekelen
© Simple:Press —