|
Hello, I am trying to use a program that exports Matlab plots to Powerpoint. The program worked with Office 2003, but returns an error when used with Office 2007. The error is as follows:
*****
??? No appropriate method, property, or field Add for class
Interface.Microsoft_PowerPoint_12.0_Object_Library.Slides.
Error in ==> exportGeom2powerpnt>startPowerpnt at 41
S1 = slides.Add(1,12);
Error in ==> exportGeom2powerpnt at 8
[ppt, aP, sh] = startPowerpnt;
Error in ==> GearGen.drawGUI>export2PPT at 668
exportGeom2powerpnt(gg);
??? Error while evaluating uicontrol Callback
*****
The section of code that is giving me problems is the following function:
%%%%%
function [ppt, aP, sh] = startPowerpnt
ppt = actxserver('powerpoint.application');
ppt.Visible = 1;
pptP = ppt.Presentations;
pptP.Add;
aP = pptP.Item(1);
slides = aP.Slides;
S1 = slides.Add(1,12);
sh = S1.Shapes;
return
%%%%%
I am wondering how to rewrite the code so that it works with Powerpoint 2007. Thanks for your ideas.
|