Sizing Excel Range (using Chart without using Chart)

From: dR <onlyng_at_gmail.com>
Date: Sun, 2 Mar 2008 12:08:08 -0800 (PST)


Platform: Win XP, Office 2003

Working from Excel VBA, I need to produce a large number of presentations with thousands of slides, on a monthly basis. Slides should be independent pictures, not editable and without any linkage.
I copy the range as picture (Shift+Edit), and accept the defaults (Appearance: As shown on screen, Format: Picture). I am OK with most of the necessary code. My main issue is the size of copied range.

Option A - Copy onto blank slide.
PowerPoint can not scale the picture, and all Excel source ranges must be resized to fit.
This option is far from ideal, for above, and other reasons.

Option B - Copy onto Content layout (the one with 6 icons, and selecting InsertChart)
I realized that when I use Chart layout, PowerPoint can scale the original range to the dimensions of the Chart container (the thick frame). One only needs to adjust the aspect ratio, which in my case is correct to begin with.

Question
How to refer to all the necessary objects with VBA from Excel? After inserting new slide of Content layout, I need to:

1.  Click the chart icon
2.  Delete the default Datasheet
3.  Delete the default chart
4.  Resize the container to full page
5.  Paste my picture

All of the above should be done with explicit references to objects, without any "Active..." or "Selection".

Thanks
dR Received on Sun Mar 02 2008 - 12:08:08 PST

Click to report inappropriate content