1

I got some duplicate VBA code question but that will not help me to complete my body msg. As you check .HTMLBody = strbody here i got some freedom to write big note. pls help to add signature in below given code

Pls help me to add outlook default signature in mail for below given VBA. It would be very useful if you had add signature code in VBA. Thanks in advance.

Note - this VBA is used in excel to generate auto mail to given mail id's with attachment and body.

Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

strbody = " Hello"

On Error Resume Next
With OutMail
    .to = "test@gmail.com"
    .cc = "test1@gmail.com"
    .BCC = ""
    .Subject = "TRANSACTING : " & Format(Date, "DD-MMM-YYYY")
    .HTMLBody = strbody
    'You can add an attachment like this
    .Attachments.Add ("E:\Auto Reports\test.xlsb")
    .send   'or use .Display
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Community
  • 1
  • 1
Akshay
  • 47
  • 1
  • 10
  • Check Mail_Outlook_With_Signature_Html_2 in this link https://www.rondebruin.nl/win/s1/outlook/signature.htm – Sixthsense Aug 17 '17 at 04:50

0 Answers0