This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


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.


collapse 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

collapse 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