Attaching Signature to Email

Farrp001

New Member
Joined
Nov 17, 2020
Messages
12
Office Version
  1. 2019
Platform
  1. Windows
I know there have been a bunch of threads on this but I tried a bunch of solutions but having problems getting my Outlook Signature added. With out posting all the variations of trying to ad olSignature As String ETC here is the working version of where I am trying to put the sig... All help is greatly appreciated.
VBA Code:
Public Sub Send_Email(toEmail As String, Optional fileAttachment1 As String, Optional fileAttachment2 As String)



    Static olApp As Object
    Dim olMsg As Object
    
    If olApp Is Nothing Then Set olApp = CreateObject("Outlook.Application")
    
    Set olMsg = olApp.CreateItem(0)
    With olMsg
        .To = toEmail
        .CC = "cced.email here"
        .Subject = "Subject"
        .HTMLBody = "Body Her"
        .Attachments.Add fileAttachment1
        .Attachments.Add "C:\Users\blah\Documents\Options.pdf"
        
        .Send
    End With
        
End Sub

Sub SendEmailWith2Attachments()
Call Send_Email("addressX@somewhere.com", "c:\user\anonymous\report.pdf", "C:\Users\blah\Desktop\Working Email Version Cheshire\Forms\Training Options.pdf")
End Sub
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Try this:

Change this:
VBA Code:
.HTMLBody = "Body Her"

For this:
VBA Code:
.HTMLBody = "Body Her" & .HTMLBody
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,517
Members
449,088
Latest member
RandomExceller01

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