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.

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.

example

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

Object identifier for the mlreportgen.ppt.Bold object, specified as a character vector or string scalar. The PPT API generates a session-unique identifier when it creates the document element object. You can specify your own value for Id.

Attributes:

NonCopyable
true

Data Types: char | string

Tag for the mlreportgen.ppt.Bold object, specified as a character vector or string scalar. The PPT API generates a session-unique tag 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. Specify your own tag value to help you identify where to look when an issue occurs during document generation.

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);

Sample slide with a paragraph that reads "Hello World How are you?", with "Hello World" displaying in bold

Version History

Introduced in R2015b