Get Started
Documentation

SetCaps

SetCaps(isCaps)

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

Parameters:

Name Type Description
isCaps boolean Specifies that the contents of the current run are displayed capitalized.

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph, oTextPr;
oTextPr = oDocument.GetDefaultTextPr();
oTextPr.SetCaps(true);
oParagraph = oDocument.GetElement(0);
oParagraph.AddText("A sample text set to capital letters using the text properties.");
builder.SaveFile("docx", "SetCaps.docx");
builder.CloseFile();

Resulting document