Prashant1211
New Member
- Joined
- Jun 9, 2020
- Messages
- 33
- Office Version
- 2016
- Platform
- Windows
Hello VBA experts,
I have below code works perfectly to create email but i am missing the signature. I tried many codes available on internet but nothing worked. can someone help me with this to add signature in the email ?
Thanks for your answers.
below is the code -
Sub SendMail()
Dim OutlookApp As Object
Set OutlookApp = CreateObject("Outlook.Application")
ActiveCell.EntireRow.Select
Dim var As Variant:
var = Selection.Value
Dim outlookMail As Object
Set outlookMail = OutlookApp.CreateItem(0)
With outlookMail
.To = var(1, 6)
.CC = "xyz"
.Subject = "update on - " & var(1, 4) & "_" & var(1, 5)
.body = "Hello " & var(1, 6) & "," & vbNewLine & vbNewLine & "Below is the update for you " & var(1, 27) & vbNewLine & vbNewLine & "Planned on: " & var(1, 40) & vbNewLine & vbNewLine & var(1, 20) & vbNewLine & vbNewLine & "Thanks and best regards"
End With
outlookMail.Display
End Sub
I have below code works perfectly to create email but i am missing the signature. I tried many codes available on internet but nothing worked. can someone help me with this to add signature in the email ?
Thanks for your answers.
below is the code -
Sub SendMail()
Dim OutlookApp As Object
Set OutlookApp = CreateObject("Outlook.Application")
ActiveCell.EntireRow.Select
Dim var As Variant:
var = Selection.Value
Dim outlookMail As Object
Set outlookMail = OutlookApp.CreateItem(0)
With outlookMail
.To = var(1, 6)
.CC = "xyz"
.Subject = "update on - " & var(1, 4) & "_" & var(1, 5)
.body = "Hello " & var(1, 6) & "," & vbNewLine & vbNewLine & "Below is the update for you " & var(1, 27) & vbNewLine & vbNewLine & "Planned on: " & var(1, 40) & vbNewLine & vbNewLine & var(1, 20) & vbNewLine & vbNewLine & "Thanks and best regards"
End With
outlookMail.Display
End Sub