I send an inline table from Excel through Outlook.
I now want/need to add images to the table.
The problem is the formatting is lost between Excel and Outlook.
Is there a way to paste the range that contains images as a table while keeping the formatting?
The closest and cleanest way I can get to this is with this snippet:
Private Sub SENDBETABTTN_Click()
'Copy range of interest
Dim r As Range
Set r = MainDRK.Range("j3:aj" & MainDRK.Range("ae87").Value)
r.Copy
'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)
'Get its Word editor
outMail.Display
Dim wordDoc As Word.Document
Set wordDoc = outMail.GetInspector.WordEditor
'To paste as picture
wordDoc.Range.PasteAndFormat wdFormatOriginalFormatting
End Sub
The remaining issue is I lose the placement of the images and in turn screw up the cell sizing of the table.