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.Paragraph.append

Package: mlreportgen.ppt

Append content to paragraph

Syntax

contentObj = append(paragraph,content)

Description

example

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

Examples

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.

replace(slides,'Title',p1);

Create a paragraph for the content of the second slide.

p2 = Paragraph('Click the link for the ');
contentObj = append(p2,ExternalLink('http://www.mathworks.com','MathWorks site.'));

Replace the content with the p2 paragraph.

replace(slides,'Content',p2);

Close the presentation.

close(slides);

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

if ispc
    winopen(slidesFile);
end

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

Was this topic helpful?