VBA code to cut a group of objects and paste as JPEG

amaresh achar

Board Regular
Joined
Dec 9, 2016
Messages
108
Office Version
  1. 365
Platform
  1. Windows
Hi,

Can anyone clarify my doubt...?

In VBA, is it possible to cut a group of objects from a worksheet, and paste as JPEG in the same worksheet on cell A1...?

I couldn't find any leads to something like this...

Thanks in advance...
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
You could create a picture of the range containing the objects and then place it wherever but I don't think it's possible to cut objects and paste pictures of them. HTH. Dave
 
Upvote 0
Actually, you can use the windows api to do this or you can use the easier hack of the chart object Export Method which supports exporting jpeg format... Before exporting the chart, you will need to use the CopyPicture Method of the shape object and then paste on the chart.
Once you have the jpeg file saved to disk, you can simply call the ActiveSheet.Pictures.Insert ("the exported jpeg file path name goes here")
Finally delete the tmp jpeg file
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,432
Messages
6,124,858
Members
449,194
Latest member
HellScout

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