MelissaCG
asked on
Email via VBA with image
Hello, here is my problem... I have a worksheet that sends an email to some people based on a range... The problem is that when this email is read from a BlackBerry cell phone, the format is lost... So I thought about, instead of pasting the table as HTML, just copy the range as a picture and paste the picture in the email body...
Is it possible??? I've searched for a bit now, but i cant find how to make this work...
Thanks in advance.
Is it possible??? I've searched for a bit now, but i cant find how to make this work...
Thanks in advance.
There are several possibilities, but Excel doesn't handle any of them very conveniently.
Possibly a better way is to get this controlled by a look like VB.Net
Otherwise you likely need a Window API to do something like a screen capture then save it and attach it to the e-mail, and Windows APIs are very wrought with problems because they are so picky about things.
Possibly a better way is to get this controlled by a look like VB.Net
Otherwise you likely need a Window API to do something like a screen capture then save it and attach it to the e-mail, and Windows APIs are very wrought with problems because they are so picky about things.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hey dlmille, your example works just PERFECTLY!!! I have just one little question before i close this question (sorry about the delay, i was out of town in the weekend). When i use it in a range that contains data, but its not actually a table, the image comes with a poor resolution. Is there a way to improve the quality of the image in that case??
Thanks :)
Thanks :)
ASKER
Here's an example of how it looks;
example.PNG
example.PNG
ASKER
Well, never mind... I just saved as BMP and it was great!! Thanks very much!!!
ASKER
Perfect solution!!
or enhanced metafile might also be an option.
Glad it worked for you!
Dave
Glad it worked for you!
Dave
However, Ron notes that the code doesn't work if your data is in an Excel 2003 list or Excel2007+ table. If you're just trying to email a tabular list or otherwise, the code should work.
Your idea to convert your table to a picture, and email the picture in the email body is intriguing...
This next set of tips look likely candates for you. http://www.codeforexcelandoutlook.com/excel-vba/send-email-from-excel/ toward the bottom are instructions in how to export a range as an image, then code for embedding the image into the body of your email message.
Let me know if you need further assistance.
Cheers,
Dave