Main Content

mlreportgen.ppt.Bold Class

Namespace: mlreportgen.ppt

Bold for text object

Description

Specifies whether to use bold for a text object.

The mlreportgen.ppt.Bold class is a handle class.

Creation

Description

boldObj = Bold creates a bold object that specifies to use bold for a text object.

example

boldObj = Bold(value) if value is true, creates a bold object that specifies to use bold for a text object. Otherwise, it creates a bold object that specifies to use regular weight text.

Input Arguments

expand all

Bold or regular weight for text, specified as a logical value. A setting of false (or 0) uses regular weight text. A setting of true (or 1) renders text in bold.

Data Types: logical

Properties

expand all

The possible values are:

  • 0— uses regular weight text

  • 1— renders text in bold

Data Types: logical

Tag for this PPT API object, specified as a character vector or string scalar. A session-unique tag is generated as part of the creation of this object. The generated tag has the form CLASS:ID, where CLASS is the object class and ID is the value of the Id property of the object.

Specifying your own tag value can help you to identify where issues occur during presentation generation.

Attributes:

NonCopyable
true

Data Types: char | string

ID for this PPT API object, specified as a character vector or string scalar. A session-unique ID is generated as part of the object creation. You can specify an ID to replace the generated ID.

Attributes:

NonCopyable
true

Data Types: char | string

Examples

collapse all

Create a presentation.

import mlreportgen.ppt.*

ppt = Presentation('myBoldPresentation.pptx');
open(ppt);

titleSlide = add(ppt,'Title and Content');

Create a paragraph and append text with bold text.

p = Paragraph('Hello World');
p.Style = {Bold(true)};
t = Text(' How are you?');
t.Style = {Bold(false)};
append(p,t);

Add the paragraph to the slide. Close and view the presentation.

replace(titleSlide,'Content',p);

close(ppt);
rptview(ppt);

Version History

Introduced in R2015b