0

I would like to add a dynamic signature in VBA whenever someone opens the distribution list to send an emails out to people.

Scenario:

IF I OPEN the distribution list, the email will be created and it will have MY Signature on to the Body of the email.

If someone ELSE opens the distribution list, their Email Signature is added to the Body of the email.

Here is the code I'm working with:

Sub Send_Email_With_Attachment()

Dim emailApplication As Object
Dim emailItem As Object


Set emailApplication = CreateObject("Outlook.Application")
Set emailItem = emailApplication.CreateItem(0)

'Date Update in Subject Line

Dim lastSunday As Date
lastSunday = DateAdd("d", 1 - Weekday(Now), Now)

'Now build the email.

emailItem.To = Range("A2").Value

emailItem.CC = Range("B2").Value

emailItem.body = "Dear All" & vbCrLf & vbCrLf & "Please find attached the Weekly Training report." & vbCrLf & vbCrLf & "Kind Regards,"

'Send the email
emailItem.Display
braX
  • 10,905
  • 5
  • 18
  • 32
QMAN
  • 17
  • 5
  • 2
    Does this answer your question? [How to get the email address of the current logged-in user?](https://stackoverflow.com/questions/26519325/how-to-get-the-email-address-of-the-current-logged-in-user) – braX Nov 24 '21 at 09:57
  • https://stackoverflow.com/questions/8994116/how-to-add-default-signature-in-outlook – braX Nov 24 '21 at 10:04

0 Answers0