This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Package: mlreportgen.ppt

Append content to paragraph


contentObj = append(paragraph,content)



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


collapse 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

collapse 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

collapse 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