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>
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>