reference image within worksheet in VBA

yrechtman

New Member
Joined
Oct 1, 2014
Messages
3
Howdy,
this should be pretty straightforward but how in VBA do i reference an image pasted with an excel sheet? I'm creating an automated email program from a contact list and I insert the body of the email with

.Body = Range("C2").Value & ActiveSheet.TextBoxes(1).Text

Where C2 is the Name of the person and the text box is the the body of the email.

Im trying to stick an image at the end of each email and would rather use an image I've pasted in than have to reference images in my directory (it'll make it easier to reuse this code with other lists).

thanks!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I'm not sure you'll be able to use an image from a worksheet.

The usual way to display images in the body of an emain is to use HTMLBody with an img tag whose src attribute refers to an image you've attached.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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