I have an Excel with an embedded image.
How can I send it by mail using the name of the image? I do not want to send it attached, I want to embed it in the html of the mail. It's possible?
Thank you very much in advance
An example code:
With objMail
'Set body format to HTML
.BodyFormat = olFormatHTML
.To = Sheet3.Range(inTo)
If (inAttach1 <> "") Then .Attachments.Add inAttach1
If (inAttach2 <> "") Then .Attachments.Add inAttach2
If (Sheet3.Range(inCC) <> "") Then .CC = Sheet3.Range(inCC)
sBody = Sheet1.Range("B2").Value
'----insert Name
iPos = InStr(1, sBody, "[FirstName]", vbTextCompare)
iPos2 = iPos + Len("[FirstName]")
sText1 = Mid(sBody, 1, iPos - 1)
sText2 = Mid(sBody, iPos2, Len(sBody) - iPos2 + 1)
sBody = sText1 & Sheet3.Range(inName) & sText2
.Subject = inSubj
.SentOnBehalfOfName = inFrom
.HTMLBody = sBody
'Importancia mail
'.Importance = olImportanceHigh
.sEnd
End With