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

Replace paragraphs, tables, or pictures in presentation



replace(presentation,placeholderName,content) replaces existing content of a placeholder with one or more paragraphs, a table, or a picture that you specify. If the type of content you specify in the content input argument is not valid for replacing the placeholder, the replace method has no effect.


expand all

Create a presentation.

import mlreportgen.ppt.*
slides = Presentation('myFirstPresentation');

Add slides.

add(slides,'Title Slide');
add(slides,'Title and Content');

Replace all the titles in the presentation.

replace(slides,'Title','My Slide Title');

Generate the presentation.


Input Arguments

expand all

Presentation to replace content in, specified as an mlreportgen.ppt.Presentation object.

Name of placeholders to replace, specified as a character vector. The placeholder name must be defined in the template.

Content to use as replacement, specified as one of these:

  • character vector

  • mlreportgen.ppt.Paragaph object

  • cell array of character vectors or Paragraph objects, or a combination of both

  • mlreportgen.ppt.Table object

  • mlreportgen.ppt.Picture object

Introduced in R2015b