close

Class: mlreportgen.ppt.Presentation
Package: mlreportgen.ppt

Close presentation

Description

example

close(presentation) closes a presentation and generates a PowerPoint® presentation.

Examples

expand all

Create a presentation.

import mlreportgen.ppt.*
slidesFile = 'myParagraphPresentation.pptx';
slides = Presentation(slidesFile);

add(slides,'Title Slide');

Create a Paragraph object to use for the title of slides. Make the text bold and red.

p = Paragraph('My Title');
p.Bold = true;
p.FontColor = 'red';

Replace the title for the first slide with the paragraph.

contents = find(slides,'Title');
replace(contents(1),p);

Close the presentation.

close(slides);

Open myParagraphPresentation.pptx file. On a Windows® platform, you can open the presentation in MATLAB®:

if ispc
    winopen(slidesFile);
end

Input Arguments

expand all

Presentation to close, specified as an mlreportgen.ppt.Presentation object.

Introduced in R2015b