On Sep 24, 4:14*pm, LunaMoon <lunamoonm...@gmail.com> wrote:
> 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
|