PowerPoint chart, change data

S

Sister Ray

I'm trying to Create a Power Point Presentation using MFC and C++.
This presentation will have some Charts, I'm trying to find out how to
change the data of the chart after having created it.

So Far I've got this code:

_Application pptApplication;
if ( !pptApplication.CreateDispatch( "Powerpoint.Application",
NULL ) ) return;
pptApplication.SetVisible(1);
Presentations pptPresentations = pptApplication.GetPresentations();
_Presentation presentation = pptPresentations.Add(100);
Slides slides(presentation.GetSlides());
_variant_t vlayout = (short)1;
_Master master = presentation.GetSlideMaster();
CustomLayouts layouts = master.GetCustomLayouts();

CustomLayout layout = layouts.Item(vlayout);

_Slide slide = slides.AddSlide(1, layout);
Shapes shapes = slide.GetShapes();
Shape chart = shapes.AddChart(5,5,5,100,100);

The question is how do i get table containing the data for the chart?

Note; I'm using office 2007.
 

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