Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.ppt.Presentation.replace

Package: mlreportgen.ppt

Replace paragraphs, tables, or pictures in presentation

Syntax

replace(presentation,placeholderName,content)

Description

example

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.

Examples

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.

close(slides);

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

Was this topic helpful?