Main Content


Class: mlreportgen.ppt.Paragraph
Package: mlreportgen.ppt

Append content to paragraph



contentObj = append(paragraph,content) appends content to a paragraph.


expand all

Create a presentation.

import mlreportgen.ppt.*

slidesFile = 'myParagraphPresentation.pptx'
slides = Presentation(slidesFile);
add(slides,'Title Slide');
add(slides,'Title and Content');

Create a Paragraph object to use for the title of slides. Make the text bold and red.

p1 = Paragraph('Title for ');

Add more text to the title.

text = append(p1,'My Presentation');
text.Bold = true;
text.FontColor = 'red';

Replace the title with the p1 paragraph.


Create a paragraph for the content of the second slide.

p2 = Paragraph('Click the link for the ');
contentObj = append(p2,ExternalLink('','MathWorks site.'));

Replace the content with the p2 paragraph.


Close the presentation.


Open myParagraphPresentation.pptx file. On a Windows® platform, you can open the presentation in MATLAB®:

if ispc

Input Arguments

expand all

Paragraph to append content to, specified as an mlreportgen.ppt.Paragraph object.

Content to add to a paragraph, specified as a character vector, an mlreportgen.ppt.Text object, or an mlreportgen.ppt.ExternalLink object.

Output Arguments

expand all

Content object, returned as an mlreportgen.ppt.Text or mlreportgen.ppt.ExternalLink object. The output object corresponds to the input character vector or Text object.

Introduced in R2015b