Compile Powerpoint slides from multiple files into one .ppt

6 visualizzazioni (ultimi 30 giorni)
Hello, Here is the problem for me as I see it. I have a legacy script that we use at work, and the output is 3 very large PowerPoint files. What I would like is a way to interface with them through Matlab so that I can designate certain slides from each ppt be saved together in a new ppt.
For example:
ppt's 1:3 have 25 slides. The structure is always the same when these ppt's are generated.
I need slide 2 and 5 from ppt1 to become slide 1 and 2 in ppt 4. Then slide 10 from ppt2 to become slide 3 in ppt 4. Then slide 15 from ppt3 to become slide 4 in ppt4.
If I had a solution for this it would save me literally hours per year copy and pasting slides. Thank you for your assistance.

Risposte (1)

Image Analyst
Image Analyst il 19 Nov 2014
  2 Commenti
Mark
Mark il 20 Nov 2014
Modificato: per isakson il 20 Nov 2014
To I guess I am just a total noob when it comes to this side of Matlab, but would it be possible to add comments to the text so I can understand what is going on? I pasted the text below from your link. Thanks!
hApp=actxserver ('Powerpoint.Application');
set(hApp,'Visible','msoTrue');
hPre=hApp.Presentations.Add;
hSli=hPre.Slides;
hPag1=hSli.Add(1,1);
hSha=hPag1.Shapes;
set(hSha.Item(1).TextFrame.TextRange,'Text','This is my title');
hPag2=hPag1.Duplicate;
hPag1.Copy
hPag3=hSli.Paste;
hPag4=hSli.Paste;
Image Analyst
Image Analyst il 20 Nov 2014
Perhaps this:
% Launch Powerpoint. Get ppt object in hApp.
hApp=actxserver ('Powerpoint.Application');
% Make it visible.
set(hApp,'Visible','msoTrue');
% Create a new ppt document.
hPre=hApp.Presentations.Add;
% Get handle to the slides sollection.
hSli=hPre.Slides;
% Add a new slide.
hPag1=hSli.Add(1,1);
% Get handle to the text boxes.
hSha=hPag1.Shapes;
% Write into the title textbox.
set(hSha.Item(1).TextFrame.TextRange,'Text','This is my title');
% Make a duplicate of this slide 1.
hPag2=hPag1.Duplicate;
% Make a new slide, a copy of the first slide.
hPag1.Copy
% Paste in the slide twice more.
hPag3=hSli.Paste;
hPag4=hSli.Paste;
I'm not 100% sure of the latter comments.

Accedi per commentare.

Categorie

Scopri di più su MATLAB Report Generator in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by