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.
-----------------------------------------------------------------------------------------
MOD EDIT: Added CODE Tag.
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: