Using Excel VBA, I am trying to add image to the mail body rather than an attachment of the mail. I tried the below code in which shows the image as body by adding image as an attachment to the mail, also it hides the attachment from the mail but the problem is mail shows the attachment symbol in the inbox. Where as the image attachment is hidden from from the mail.
Is there any better way to add the image as an content of the body and not as an attachment.
On Error Resume Next
With OutMail
.To = ABC
.CC = ""
.BCC = ""
.Subject = "Happy Diwali"
.Attachments.Add "C:\Users\User~1.test\AppData\Local\Temp\NamePicture.jpg", 1, 0
'Note: Change the width and height as needed
.HTMLBody = "<html><body><center><p><b><font size=""6"" color=""purple"">" & "Dear," & "</p><p>" & strEmpFrstNm & " and Family" & "</font></b></p><img src=""cid:NamePicture.jpg"" width=1000 height=950> </image></center></body></html>"
.Send
End With
Mail_JPG_Range_Outlook = True
On Error GoTo 0