• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

how to add signature default in outlook

Ankur Kumar

New Member
HI,

i am sending direct email from excel using vba coding but unfortunately my default signature is not visible while i am sending email from excel only email addresses subject and attachment is showing here is my code as mentioned below please help me out how i can add my signature and body text in that email.

Code:
Sub Revenue_Details()

' Working in Office 2000-2016
ThisWorkbook.Save
    Dim OutApp As Object
    Dim OutMail As Object
    Dim strbody As String

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

 

    On Error Resume Next

    With OutMail
        .Display
        .To = "abc.com"
        .CC = ""
        .BCC = ""
        .Subject = "Sale Details" & " " & Format(Date, "dd/MM/yyyy")
        .Body = strbody & vbNewLine & .Body
        strbody = "Dear All," & vbNewLine & vbNewLine & _
              "Please find attached Sales Detail.  "
        .Attachments.Add ActiveWorkbook.FullName
     
        .Send
    End With

    On Error GoTo 0
    Set OutMail = Nothing
    Set OutApp = Nothing
 
 
 
End Sub
-----------------------------------------------------------------------------------------
MOD EDIT: Added CODE Tag.
 
Last edited by a moderator:
Back
Top