Class: mlreportgen.ppt.TextBox
Package: mlreportgen.ppt

Add paragraph to text box



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

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


expand 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 text to the text box.

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

Generate the presentation.


Input Arguments

expand 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

expand all

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

Introduced in R2015b