Excel VBA E-mail Signature Question.

Richard1982

New Member
Joined
Jul 6, 2022
Messages
11
Office Version
  1. 365
Platform
  1. Windows
Hello!
I've just joined the forum so I'm new, although I've been using Excel at work for a while now - I'm slowly getting to grips with it. I produce a daily report that gets e-mailed out (directly from Excel) to many people. At the moment it creates the e-mails but I have to manually click on the Outlook window it produces to add my signature, is there anyway to automate adding the signature? If it could add the signature then I'd skip the bit where it shows the e-mails and it would just send them, so it would save me a fair bit of time.

The code for sending the e-mails is:

Set OutlookMail = OutlookApp.CreateItem(0)
With OutlookMail
EmailName = WorksheetFunction.VLookup(pf.PivotItems(i).Name, Worksheets("Email").Range("DivHeadTable"), 2)
.Display

.To = WorksheetFunction.VLookup(pf.PivotItems(i).Name, Worksheets("Email").Range("DivHeadTable"), 3)
.CC = Email_CC
.BCC = Email_BCC
.Subject = EmailSubject & pf.PivotItems(i).Name & ": " & EmailDate
.Attachments.Add NewFile
.Body = "Dear " & EmailName & "." & vbLf & vbLf & " Please find attached the report issued as at " & EmailDate & EmailBody


Any help would be greatly appreciated :) I'm still learning VBA so please excuse any thing that could be done better!

Thank you, Richard.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,214,943
Messages
6,122,376
Members
449,080
Latest member
Armadillos

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