SetCaps

function SetCaps(isCaps: any = null): void

Description

Specifies that any lowercase characters in the text run are formatted for display only as their capital letter character equivalents.

Parameters

isCapsanydefault: null

Specifies that the contents of the current run are displayed capitalized.

Returns

void

Overloads By

SetCaps(isCaps): ApiTextPr

Specifies that any lowercase characters in the current text run are formatted for display only as their capital letter character equivalents.

Try It

var oDocument = Api.GetDocument();
var oTextPr = oDocument.GetDefaultTextPr();
oTextPr.SetCaps(true);
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("A sample text set to capital letters using the text properties.");

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).