m0tSiE
asked on
Send embedded image from Resources in VB.Net?
Hi,
I've currently got a form that i'm using to send html emails, however I want to send an image in these email that will always be the same.
Therefore I have added the image to the resources of my form, however I cant seem to embed it in the email.
Can anyone show me how to amend my code to do this?
QuickM_il.My.Resources.Res ources.log o is the image I am trying to embed.
Thanks,
Paul.
I've currently got a form that i'm using to send html emails, however I want to send an image in these email that will always be the same.
Therefore I have added the image to the resources of my form, however I cant seem to embed it in the email.
Can anyone show me how to amend my code to do this?
QuickM_il.My.Resources.Res
Thanks,
Paul.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon()
OutMail = OutApp.CreateItem(0)
PictureBox1.Image = QuickM_il.My.Resources.Resources.logo
strbody = "<html><body><font color='red'>TEXT</font></b><br><br><img src=""PictureBox1.Image""></body></html>" & _
"Dear all," & vbNewLine & vbNewLine & _
"This is a test email." & vbNewLine & _
"" & vbNewLine & _
"" & vbNewLine & _
"Thanks and regards," & _
"" & vbNewLine & _
"Paul"
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I managed to do it using...
.Attachments.Add("c:\temp\
And then just typing the filename in the img src field :D