Since I am new to the VBA I am trying to structure a code to send email through outlook with the signature.But when I run the below code it displays me only the signature (body does not appear).
When I use "F8" and check it can be clearly seen that my body appears then signature overwrites it.How do I fix this?
Option Explicit
Sub SendEmailwithsign()
Dim objoutApp As Object, objoutmail As Object
Dim strbody As String, strSig As String
Set objoutApp = CreateObject("outlook.Application")
Set objoutmail = objoutApp.CreateItem(0)
On Error Resume Next
With objoutmail
.To = "AAAAAAAAA@.com"
.CC = ""
.Subject = "Test mail"
.Recipients.ResolveAll
.Display 'body appears until this point'
strSig = .Environ("appdata") & "Microsoft\Signatures\bbbb.txt"
strbody = "Hello"
.body = strbody & strSig 'with this step Body part does not appear but only the signature'
End With
On Error GoTo 0
Set objoutmail = Nothing
Set objoutApp = Nothing
End Sub