Main Content

append

Class: mlreportgen.ppt.Paragraph
Namespace: mlreportgen.ppt

Append content to paragraph

Description

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

example

Examples

expand all

Create a presentation.

import mlreportgen.ppt.*

ppt = Presentation('myParagraphPresentation.pptx');
open(ppt);
add(ppt,'Title Slide');
add(ppt,'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(ppt,'Title',p1);

Create a paragraph for the content of the second slide.

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

Replace the content with the p2 paragraph.

replace(ppt,'Content',p2);

Close and view the presentation.

close(ppt);
rptview(ppt);

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, or an mlreportgen.ppt.Text, mlreportgen.ppt.InternalLink, or mlreportgen.ppt.ExternalLink or an object.

Output Arguments

expand all

Content object, returned as an mlreportgen.ppt.Text, mlreportgen.ppt.InternalLink, or mlreportgen.ppt.ExternalLink or an object.

Version History

Introduced in R2015b