Solution 1 :

Don’t use the Body and HTMLBody property in the same place or if you want to preserve formatting. The HTMLBody allows you adding any images, but you need to remember that you deal with a valid HTML document. So, you can insert the image between the opening <body> and closing </body> tags.

If you need to get the signature added first, you need to call the Display and then get or modify the HTMLBody property.

Solution 2 :

This code will use your signature you have set in Outlook.

Dim Signature As Variant

With OutMail
    'Capture signature block.
     Signature = .HTMLBody
    .To = ""
    .CC = ""
    .Subject = "Build Plan"
    .HTMLBody = "Hello George," & "<br><br>" & _
    "Please incorporate these numbers into your next build schedule." & "<br>br>" & Signature
    .Display    'or .Send
End With

Solution 3 :

Do not use plain text Body property at all, always set HTMLBody.

Keep in mind that you need to merge your own data with the existing HTMLBody (populated with the signature when Display is called) – find the position of the "<body" string, find the position of the next ">" (to take care of <body> tags with attributes), then insert your own HTML after that ">".

Problem :

i am trying to send emails through excel and keep the email signature i am able to either save .body as text withough the image or insert the image through .HTMLbody but this messes up the text format any idea how i can have it either keep or insert the image withough changing the text format

Sub email()
'Microsoft Outlook XX.X Object Library is required to run this code
'Variable declaration
Dim objOutlook As Outlook.Application
Dim objMail As Outlook.MailItem
Dim lCounter As Long
Dim signature As String

'Set objects
Set objOutlook = Outlook.Application

'Read details from Excel sheet and draft emails
    'You can change the counter as per requirement
    'Create a new email item
    Set objMail = objOutlook.CreateItem(olMailItem)
    signature = objMail.Body
    objMail.To = "[email protected]"
    objMail.CC = ""
    objMail.Subject = "subject here"
    'Email Body
    objMail.Body = "whatever i want" & objMail.Body
    objMail.HTMLBody = vbCrLf & "<img src='K:Capital OneNoting Program and spreadsheetsAdmin Controls for automations teamEmail signature DO NOT USEemail signature.PNG'>"
    'Add Attachment
    'Draft email
    'Close the object
    Set objMail = Nothing
'Show confirmation message to user
MsgBox "Done", vbInformation
End Sub


Comment posted by Eugene Astafiev

I’ve have already mentioned that in my post.

By esgsw