I'm using a solution from Pasting an Excel range into an email as a picture. How can I paste two ranges into an email?
In my attempt below, the second picture is overwriting the first picture. I would like the second picture to appear after the first one.
Private Sub generateEmail(rng As Range, rng2 As Range, strName As String)
'Open a new mail item
Dim outlookApp As Outlook.Application
Set outlookApp = CreateObject("Outlook.Application")
Dim outMail As Outlook.MailItem
Set outMail = outlookApp.CreateItem(olMailItem)
With outMail
.To = strName
.Subject = "** Please confirm Timesheet by 10:30AM **"
.Importance = olImportanceHigh
.Display
End With
'Get its Word editor
Dim wordDoc As Word.Document
Set wordDoc = outMail.GetInspector.WordEditor
'To paste as picture
rng.Copy
wordDoc.Range.PasteSpecial , , , , wdPasteBitmap
rng2.Copy
wordDoc.Range.PasteSpecial , , , , wdPasteBitmap
outMail.HTMLBody = "Timesheets Submitted by " & strName & "<br>" & _
Range("DateText") & vbNewLine & outMail.HTMLBody
End Sub