I'm trying to build an email that has both text and an image (chart from Excel) using HTML code. I merged code I found online.
This is what I have so far for the image:
FirstChartPath = ThisWorkbook.Path & "\Current Credit Usage.png"
ChartName = "Current Credit Usage.png"
'add the image in hidden manner, position at 0 will make it hidden
.Attachments.Add FirstChartPath, olByValue, 0
'Now add it to the Html body using image name
'change the src property to 'cid:your image filename'
'it will be changed to the correct cid when its sent.
.HTMLBody = .HTMLBody & "<br><B>CURRENT CREDIT USAGE:</B><br>" _
& "<img src='cid:Current Credit Usage.png'" & "width='500' height='200'>"
'& "<br>Best Regards, <br>Sumit</font></span>"
I get an "X" in the image saying the linked image cannot be displayed.
"The file may have been moved, renamed or deleted. Verify that the link points to the correct file and location"