Hi,
found this excellent vba code from Ron website to add path to link of the active sheet, I prepare every week EFT spreadsheet save in different folder name by date along with PDF backup same folder which are the approved invoices to pay, will possible to add automatically backup link (same location as spreadsheet)
Code:
Thank you,
found this excellent vba code from Ron website to add path to link of the active sheet, I prepare every week EFT spreadsheet save in different folder name by date along with PDF backup same folder which are the approved invoices to pay, will possible to add automatically backup link (same location as spreadsheet)
Code:
VBA Code:
Sub Make_Outlook_Mail_With_File_Link()
'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
'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>" & _
"<br><br>Thank you," & _
"<br><br></font>"
On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = ActiveWorkbook.Name
.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
Thank you,