Get Started
Usage API

SetBold

SetBold(isBold) → { ApiRange | null }

Set the bold property to the text character.

Parameters:

Name Type Description
isBold bool

Specifies that the contents of this Range are displayed bold.

Returns:

Type
ApiRange | null

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph = oDocument.GetElement(0);
oParagraph.AddText("ONLYOFFICE Document Builder");
oRange = oDocument.GetRange(0, 24);
oRange.SetBold(true);
builder.SaveFile("docx", "SetBold.docx");
builder.CloseFile();

Resulting document