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.
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.