Class: mlreportgen.ppt.TextBoxPlaceholder
Package: mlreportgen.ppt

Replace text box placeholder paragraphs



paraObj = replace(textBoxPlaceholder,content) replaces the text in a text box placeholder.

replace(textBoxPlaceholder,contents) replaces multiple paragraphs in a text box placeholder.


expand all

Create a presentation.

import mlreportgen.ppt.*

slides = Presentation('myTextBoxReplacePresentation');
add(slides,'Title and Content');

Create an mlreportgen.ppt.Paragraph object.

p = Paragraph('Hello World');

Use the Presentation.find method to find text box placeholders called Title in the presentation. Replace the title for the first slide with the paragraph.

contents = find(slides,'Title');

Add the paragraph to the first slide.


Close the presentation.


Input Arguments

expand all

Text box placeholder to replace text in, specified as an mlreportgen.ppt.TextBoxPlaceholder object.

Text to use as replacement, specified as a character vector, array, cell array, or Paragraph object. If you specify an array, include only mlreportgen.ppt.Paragraph objects in the array. If you specify a cell array, you can include character vectors and mlreportgen.ppt.Paragraph objects.

Content to use as a replacement, specified as a cell array of character vectors, mlreportgen.ppt.Paragraph objects, or a combination of both. Inner cell arrays specify inner list items. The slide layout specifies whether the text displays as paragraphs, bulleted list items, or numbered list items.

Output Arguments

expand all

Paragraph, represented by an mlreportgen.ppt.Paragraph object.

Introduced in R2015b