Display signature with html VBA

Thanek

New Member
Joined
Apr 5, 2013
Messages
45
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?

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
</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:">
 
Last edited:

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,203,487
Messages
6,055,713
Members
444,810
Latest member
ExcelMuch

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top