Dear Experts,
I am using following code to create outlook email from excel but as in my outlook signature is set, it is not appearing same. How to do please help
im OutApp As Object, OutMail As Object
'Create PDF of active sheet only
strPath = Environ$("temp") & "\" 'Or any other path, but include trailing "\"
strFName = ThisWorkbook.Path & ActiveWorkbook.Name
strFName = ActiveSheet.Range("k9").Value & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:= _
strPath & strFName, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
Set objOutlook = CreateObject("Outlook.Application")
Set objMail = objOutlook.CreateItem(0)
With objMail
.Display
End With
signature = objMail.body
With objMail
.To = "[email protected]"
.CC = "[email protected]"
.Subject = "Document Release Request - " & Range("K9").Value
.body = "Dear DMG" & "," & vbNewLine & _
vbNewLine & _
"Please Process the document as per attached document Request Form, native & signed file are available in the following path." & vbNewLine & _
vbNewLine & _
"Kindly acknowledge the same after process." & _
vbNewLine & _
vbNewLine & signature
.Attachments.Add strPath & strFName
'.Display 'Use only during debugging ##############################
'.Send 'Uncomment to send e-mail ##############################
End With
Set objOutlook = Nothing
Set objMail = Nothing
Thanks in advance,
Rajeev
Bookmarks