So I am trying to email a link to a file on a shared drive. The script works fine except any way I've tried to add my default Outlook Signature I either lose the link to the file or I end up without the icon/links in my signature.
Is there a proper way to include a signature here and still keep my file link intact?
</file:"></file:">
I've tried a few ways to get past getting weird formatting when I post how the file is linked... Basically is a File: with a call for the ActiveWorkbook.FullName<file:" &="" activeworkbook.fullname="" "="">
This displays the excel file link when it opens the outlook window.</file:">
Is there a proper way to include a signature here and still keep my file link intact?
Code:
Sub Make_Outlook_Mail_With_File_Link()
'Working in Office 2000-2010
Dim OutApp As Object
Dim OutMail As Object
Dim Signature As String
If ActiveWorkbook.Path <> "" Then
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = ""
.Subject = ""
.Body = "" & "<file:" &="" activeworkbook.fullname="" "="">"</file:"><file:" &="" activeworkbook.fullname="" "=""><file:" &="" activeworkbook.fullname="" "="">
.Display
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
I've tried a few ways to get past getting weird formatting when I post how the file is linked... Basically is a File: with a call for the ActiveWorkbook.FullName<file:" &="" activeworkbook.fullname="" "="">
This displays the excel file link when it opens the outlook window.</file:">
Last edited: