I have VBA code that would open an new email and I want to add :
Hello,
<Email body text stored in as String Variable inserted here>
<Chart copied from Excel inserted here>
<Standard Signature inserted Here>
I have the following code. It all works except that the Chart is inserted after the Signature.
Does anyone know how to change it so the chart gets inserted between the Body text and and the Signature at the bottom?
With OutMail
.display
.to = Recipient
.CC = ""
.BCC = ""
.Subject = SubjectTitle
ThisWorkbook.Worksheets("Email Templates").Range(Rng).Copy
If Not TemplateType = 8 Then
Set vInspector = OutMail.GetInspector
Set wEditor = vInspector.WordEditor
End If
wEditor.Application.Selection.Start = Len(.Body)
wEditor.Application.Selection.End = wEditor.Application.Selection.Start
wEditor.Application.Selection.Paste
strSig = .HTMLBody
strBody = "<font face=Tahoma size=3> Hello, </calibri> <p>" & _
"<font color=black> " & MSGbody
'COMBINE THE EMAIL WITH THE SIGNATURE
.HTMLBody = strBody & strSig
'IF YOU DO NOT HAVE HTML IN THE BODY, USE THIS INSTEAD
'.Body = strBody & strSig
If attachmentloc <> "" Then
.Attachments.Add (attachmentloc)
End If
End With
Hello,
<Email body text stored in as String Variable inserted here>
<Chart copied from Excel inserted here>
<Standard Signature inserted Here>
I have the following code. It all works except that the Chart is inserted after the Signature.
Does anyone know how to change it so the chart gets inserted between the Body text and and the Signature at the bottom?
With OutMail
.display
.to = Recipient
.CC = ""
.BCC = ""
.Subject = SubjectTitle
ThisWorkbook.Worksheets("Email Templates").Range(Rng).Copy
If Not TemplateType = 8 Then
Set vInspector = OutMail.GetInspector
Set wEditor = vInspector.WordEditor
End If
wEditor.Application.Selection.Start = Len(.Body)
wEditor.Application.Selection.End = wEditor.Application.Selection.Start
wEditor.Application.Selection.Paste
strSig = .HTMLBody
strBody = "<font face=Tahoma size=3> Hello, </calibri> <p>" & _
"<font color=black> " & MSGbody
'COMBINE THE EMAIL WITH THE SIGNATURE
.HTMLBody = strBody & strSig
'IF YOU DO NOT HAVE HTML IN THE BODY, USE THIS INSTEAD
'.Body = strBody & strSig
If attachmentloc <> "" Then
.Attachments.Add (attachmentloc)
End If
End With