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.Bold class

Package: mlreportgen.ppt
Superclasses:

Bold for text object

Description

Specifies whether to use bold for a text object.

Construction

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.

Input Arguments

expand all

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

Data Types: logical

Output Arguments

expand all

Bold text, returned as an mlreportgen.ppt.Bold object.

Properties

expand all

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

Tag for this PPT API object, specified as a character vector. 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.

An example of a reason for specifying your own tag value is to make it easier to identify where an issue occurred during presentation generation.

The possible values are:

  • 0 — uses regular weight text

  • 1 — renders text in bold

Data Types: logical

Examples

expand all

Create a presentation.

import mlreportgen.ppt.*

slidesFile = 'myBoldPresentation.pptx';
slides = Presentation(slidesFile);

titleSlide = add(slides,'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 and close the presentation.

replace(titleSlide,'Content',p);

close(slides);

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

if ispc
    winopen(slidesFile);
end

Introduced in R2015b

Was this topic helpful?