How do I copy some cells(including formatting) and save as image fileusing VBA?

L

LunaMoon

How do I copy some cells(including formatting) and save as image file
using VBA?

Ultimately, I want to do that via COM or ActiveX server. Yet I think
VBA is the starting point.

So lets start from VBA.

How to do that in VBA?

I know how to open and close the Excel sheet.

But what's the command in VBA/COM/ACTIVEX to copy a few cells
(rectangular shape, including formatting), and save as image?
 
J

James Ravenswood

How do I copy some cells(including formatting) and save as image file
using VBA?

Ultimately, I want to do that via COM or ActiveX server. Yet I think
VBA is the starting point.

So lets start from VBA.

How to do that in VBA?

I know how to open and close the Excel sheet.

But what's the command in VBA/COM/ACTIVEX  to copy a few cells
(rectangular shape, including formatting), and save as image?

Within a VBA environment, I would use PowerPoint. Make an Excel macro
to:

1. launch PowerPoint
2. copy the section as picture
Range("A1:B2").Select
Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
3. paste into PowerPoint
4. save the PowerPoint as .jpg, for example
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top