I have the following code and want to include a JPEG image from my desktop at the end of the code.Anyone know how?Please Login or Register to view this content.
I have the following code and want to include a JPEG image from my desktop at the end of the code.Anyone know how?Please Login or Register to view this content.
something like this...
Please Login or Register to view this content.
Regards, John55
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
...enjoy -funny parrots-
You need to attach the image then use an IMG tag with the src as "cid:imagename.jpg".
Oh, and instead of Body you need to use HTMLBody.
If posting code please use code tags, see here.
John, a small box appeared with an x where the picture was supposed to be in the email. I did change the path of the picture
Norie,
Can you please show exactly what you mean and where it needs to go. I am not the best with VBA.
Thanks
I really appreciate you guys helping out and I'm sure you are busy, but if you have time now it would help a lot if we could work through this asap as I am being rushed for this Macro.
Thanks again,
Have a look here http://www.mrexcel.com/forum/excel-q...ook-email.html.
I know it's a long thread, from a different forum, but it should help.
Hi bocaj,
it should work if you have a picture on yr desktop(or depend on yr path) as png, (check the full path of yr picture, right click, properties, location) I use this code with our comp logo for sending diff emails and it works fain.
It is a .JPG, does it have to be a png
Norie,
I cannot see the code on that forum as I am not a member.
tried with a jpg and it works...
This is how you attach an image called TAT_Summary.jpg which you have previously attached to the email, oEmail.
I would post the complete code but you've only posted the line of code for setting the body of an email.Please Login or Register to view this content.
John55
Are you sure the recipient can see the image?
If they can it would suggest they have access to the desktop of the user who sent the email, which might not be a good thing.
John, Norie was right, the recipient can't see the image. Norie, I'm going to be honest I really don't know where that code belongs or where I should attach the image. I've uploaded the code below for you to more easily assist. Thanks again!Please Login or Register to view this content.
John55
Is the URL, C:\..., definitely as you posted?
Wait a minute, are you putting the image in your signature?
If you are that's not the same as putting it in the body if the email, which I assume is what the OP wants - though of course I may be wrong.
Last edited by Norie; 06-21-2013 at 11:41 AM.
Norie,
Can you please show me where and what I need to add?
Thanks
This is from memory so might be slightly out - not at a computer to check.Please Login or Register to view this content.
Norie, it's in the code as I posted, I said "signature" because is below of my text...
few minutes ago I asked my colleague to send to me a test, I rcvd it with picture! that's it!
I am sorry for bocaj315, I provided exacltly what I use every day!
I've got it. John, my original post skipped cells if they were blank--that's why there were all of those if statements. I've tried putting the same code in my HTML body but there must be a different syntax required. ANy ideas?
just replace vbNewLine with "<br/>"
Please Login or Register to view this content.
That only starts a new line. In order to check if the cells are blank and skip them if they are, I'm pretty sure there needs to be some sort of if statement followed by vbnullstring.
I am asking a similar question in my forum.
After the img src = cid: I need to put my directory to my image source, right??Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks