Microsoft Graph vs Embedded Excel Chart

C

cr113

I've been creating Powerpoint charts programmatically using VBA for
several years. I've been using embedded Excel charts. I start with a
ppt file that has the Excel charts already embedded in the ppt file.
Then I populate the Excel data cells with my VBA code. This worked
fairly well while we were using Office 2000. Now we've upgraded to
Office 2003 and I'm having trouble. The problem is when I try to
manually open an embedded Excel chart (right mouse click on chart -
Chart Object - Open). When I close Excel the chart shrinks in
Powerpoint. This has always been flakey even in 2000 but now it's much
worse in 2003.

I've been experimenting with inserting a chart in Powerpoint using the
Insert-Chart option found in Powerpoint instead of embedding Excel
charts. I think this is called a Microsoft Graph object. This seems to
be more stable but I'm not sure.

Anyway here's my question.

Should I use Microsoft Graph or embedded Excel charts to
programmatically create charts in Powerpoint?
 
C

cr113

Steve said:
MSGraph doesn't seem to have this same sizing problem, but sheds its own share
of flakes.

By and large your Excel code can probably be adapted fairly easily to MSGraph,
at least the charting portion, but there are a few things that you can't do via
VBA. Setting colors other than those already supplied in the chart palette and
accesing the source of linked data in the datasheet come to mind right off.

That shouldn't be a problem. I'll just start with a ppt file full of
blank (no data in datasheet) MSGraph charts and use it as a template.
Then I'll populate the datasheets in each chart. That way I don't have
to use VBA to set colors and style and things like that.

Thanks!

Chuck.
 
C

cr113

Steve said:
You may need to fill the charts with dummy data before you can format it. I may've
missed some little trick or other but near's I can tell, MSGraph won't let you
format data that isn't there.

Yup. I had to put dummy data in my embedded excel worksheets, format
the chart, then delete the data. Actually deleting the data is probably
unnecessary since I overwrite it.
 

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