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.TextBox.add

Package: mlreportgen.ppt

Add paragraph to text box

Syntax

paraObj = add(textBox,content)
add(textBox,contents)

Description

example

paraObj = add(textBox,content) adds a paragraph to a text box.

add(textBox,contents) adds multiple paragraphs to a text box placeholder.

Examples

collapse all

Create a presentation.

import mlreportgen.ppt.*

slidesFile = 'myTextBoxAddPresentation.pptx';
slides = Presentation(slidesFile);
slide1 = add(slides,'Blank');

Add a text box to the blank slide (slide1).

tb = TextBox();
tb.X = '1in';
tb.Y = '1in';
tb.Width = '4 in';
tb.Height = '2in';

add(slide1,tb);

Add text to the text box.

para = add(tb,'This is the content');
para.Bold = true;

Generate the presentation.

close(slides);

Input Arguments

collapse all

Text box to add text to, specified as an mlreportgen.ppt.TextBox object.

Content to add to a text box, 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 add, 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

collapse all

Paragraph, returned as an mlreportgen.dom.Paragraph object.

Introduced in R2015b

Was this topic helpful?