Excel mail embed image, not showing at receiver

DaLiMan

Active Member
Joined
Jun 1, 2004
Messages
295
Hi,

I'm searching the Forum and the rest of internet for a solution all morning but haven't found my solution yet.

I have made a code from an example from Ron de Bruin. (Which is always good code.)
But after mailing to some else the embedded picture isn't showing.
I tried my own Google mail, but also there it is not showing.

There is a solution however with something like [PR_ATTACH_CONTENT_ID ]
See here: vba email embed image not showing - Stack Overflow

However I cannot recreate my code using this solution without any error or without losing my default signature.

Can anyone help me out here?



<code>
Function QWKmailer()
' Working in Office 2000-2013
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

ExportFunc = QWKexportBMP

strbody = "<p style='font-family:calibri;font-size:11pt'>" & "Beste , <br><br>" & _
"Onderstaand onze prijsopgaaf.<br><br>"

On Error Resume Next

With OutMail
.Attachments.Add "H:\QWK.jpg"
.display
.To = ""
.CC = ""
.BCC = ""
.Subject = "TU prijsopgaaf: " & Worksheets("WIK AANBIEDING").Range("C8")
.HTMLBody = strbody & "img src='cid:QWK.jpg'" & .HTMLBody
' .Send
End With

On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing

Kill "H:\" & Worksheets("WIK AANBIEDING").Range("C7") & ".jpg"
'Beveilgingen aanzetten
ActiveSheet.Protect ("T12037"), DrawingObjects:=False, AllowFormattingCells:=True
End Function
</code>
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Try...
Code:
.HTMLBody = strbody & "[COLOR=#ff0000]<[/COLOR]img src='cid:QWK.jpg'[COLOR=#ff0000]>[/COLOR]" & .HTMLBody

Hope this helps!
 
Upvote 0
Try...
Code:
.HTMLBody = strbody & "[COLOR=#ff0000]<[/COLOR]img src='cid:QWK.jpg'[COLOR=#ff0000]>[/COLOR]" & .HTMLBody

Hope this helps!

Hi Domenic,

Thank you for your reply.
Sorry, for the typo in the code. This was left out intentially, because strange things happened when I left it in.
( The forum message was messed up.)

The problem is not the image not showing in the mail before sending.
But at the receivers end the image is giving the problems saying it does not exist.

Therefore I was trying to add the code given in the link to my other code.

Regards, Daniel
 
Upvote 0
Is it that it doesn't exist? Or is it that it doesn't display? If the latter, check whether the receiver's email program is set to block automatic picture downloads from the Internet.
 
Upvote 0
Is it that it doesn't exist? Or is it that it doesn't display? If the latter, check whether the receiver's email program is set to block automatic picture downloads from the Internet.

Sorry for the late reaction. I was offline for sometime. ;)

I'm now trying to send te mail to my own Gmail and it is not showing the picture.
Sending the mail to a collegea does not have this problem. (it shows the picture)

The code from StackOverflow has a good solution for it. However it loses the default signature from my outlook.
The other code which originates from Ron de Bruin does keep my original signature, but the embedded attachments are not visible for every receiver.

So I was trying to bring both codes into 1, keeping my default signature and showing the embedded picture.

I hope someone can help me.
In the mean time i'll just keep trying.

Regards,
daniel
 
Upvote 0

Forum statistics

Threads
1,224,280
Messages
6,177,676
Members
452,791
Latest member
Ritayougs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top