Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Documentation for PowerPoint ActiveX Commands
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Kevin

Posts: 1
Registered: 7/28/14
Documentation for PowerPoint ActiveX Commands
Posted: Jul 28, 2014 11:54 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi everyone,

I am trying to do some simple automation on PowerPoint files, eg. saveas PPT to PDF file in color and turn on "show hidden slides".

However, finding the activeX command turns out not to be easy. I have tried microsoft website (but no luck).

I have found the following example code. Where is the documentation for these activeX commands?

Thanks


%%
ppt = actxserver('powerpoint.application');
%%
ppt.Visible = 1; % Keep Application Visible
ppt.WindowState = 2; % Minimize PowerPoint window to taskbar

pptFile = 'C:\class\Test.pptx';
% Open existing presentation
op = invoke(ppt.Presentations, 'Open', pptFile);

%%
% Get current number of slides
slide_count = get(op.Slides, 'Count');

% Add a new slide (with title object):
slide_count = int32(double(slide_count)+1);
new_slide = invoke(op.Slides, 'Add', slide_count, 11);

% Insert text into the title object
new_slide.Shapes.Title.TextFrame.TextRange.Text = 'Test title';

%%
% Save file as new
% invoke(op, 'SaveAs', outfileppt, 1);
invoke(op, 'Save');

% Close the presentation window
invoke(op, 'Close');

% Quit PowerPoint
invoke(ppt, 'Quit');

% Close PowerPoint and terminate ActiveX
delete(ppt);



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.