[HELP] Macro Email Signature with Picture

raymond_vila12

New Member
Joined
Oct 13, 2015
Messages
7
open
Hi, I'm trying to generate a macro email with my current signature but the picture is not showing correctly.

The picture in my current macro can be shown in the link below.
https://drive.google.com/open?id=1d4t2_k55WMWZTCGZe47b9sWwy6EOfTmP

Here is my code.
open

Code:
Function GetBoiler(ByVal sFile As String) As String
    Dim fso As Object
    Dim ts As Object
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set ts = fso.GetFile(sFile).OpenAsTextStream(1, -2)
    GetBoiler = ts.readall
    ts.Close
End Function


Sub MailSajorRecon() 
    
    Dim OutApp As Object
    Dim OutMail As Object
    Dim strbody As String
 
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)
        
    SigString = Environ("appdata") & _
                "\Microsoft\Signatures\Signature2.htm"




    If Dir(SigString) <> "" Then
        Signature = GetBoiler(SigString)
    Else
        Signature = ""
    End If
    
    
    On Error Resume Next
    With OutMail
        .to = Range("F2").Value
        .CC = ""
        .BCC = ""
        .Subject = Range("F5").Value
        .HTMLBody = Range("F6").Value & "
" & Signature
        .Attachments.Add (Range("F8").Value)
        .Display
    End With
    On Error GoTo 0


    Set OutMail = Nothing
    Set OutApp = Nothing



End Sub


Thanks in advance for anyone who can help.:)
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

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