Compile Powerpoint slides from multiple files into one .ppt
6 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Image Analyst
2014-11-19
2 个评论
Image Analyst
2014-11-20
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Report Generator 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!