A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Further to my previous post, I have been performing some testing and I have identified that there is a problem with gmail displaying the image.
It prompted me to Display the message instead of just sending it because I wanted to ensure that the image was in the email before it sent. Having done this and then sent, it worked and the image was visible in the gmail.
Therefore I inserted a .Display line before the send and it works fine.
.To = toMail
.cc = Sheet2.Cells(i, "I").Value
.Subject = Sheet1.Range("b2").Value
.HTMLBody = "<body>Dear Sir/Madam," & "<img src=" & "'" & pPath & "'/> Regards,LearnExcelMacro.com </body>"
.Display
.Send
End With
I thought that it might be that the Send is too fast for the image to display in Outlook mail before it was sending so I inserted a Wait command before the send but to no avail.