
Jose Zavala
Member
Members

Forum Posts: 42
Member Since:
October 25, 2017
October 25, 2017

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: 689
Member Since:
November 1, 2018
November 1, 2018

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: Ineke Smit
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
Hans Hallebeek: 186
Newest Members:
Kate Dyka
Kwaje Alfred Mogga
thong nguyen
Appiagyei Kofi Frimpong
Hilary Burchfield
Richie Wright
Adel Kock
Barbara Murray
Doug Milne
Siobhan Stringer
Forum Stats:
Groups: 3
Forums: 24
Topics: 6546
Posts: 28658
Member Stats:
Guest Posters: 49
Members: 32832
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: Velouria, Riny van Eekelen
© Simple:Press —
