In order to achieve cross platform capability, I've been using the MATLAB Report Generator toolbox to manipulate PowerPoint presentation programmatically. I was going to organize the presentation structure by adding sections to it.
Here is an equivalent MWE with ActiveX on Windows:
% invoke activex server
ppt = actxserver('powerpoint.application');% add a presentation
ppt.Presentations.Add();% choose a layout
layout = ppt.ActivePresentation.SlideMaster.CustomLayouts.Item(1);% add slide 1 and section 1
ppt.ActivePresentation.Slides.AddSlide(1, layout);ppt.ActivePresentation.SectionProperties.AddBeforeSlide(1,'mySection1');% add slide 2 and section 2
ppt.ActivePresentation.Slides.AddSlide(2, layout);ppt.ActivePresentation.SectionProperties.AddBeforeSlide(2,'mySection2');
I would like to get the same thing done with Report Generator..
Best Answer