Get Started
Usage API

AddText

AddText(sText) → { bool }

Adds text to the current content control.

Parameters:

Name Type Description
sText String

The text which will be add to the content control.

Returns:

Type
bool

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph = oDocument.GetElement(0);
oInlineLvlSdt = Api.CreateInlineLvlSdt();
oInlineLvlSdt.AddText("This is an inline text content control.");
oParagraph.AddInlineLvlSdt(oInlineLvlSdt);
builder.SaveFile("docx", "AddText.docx");
builder.CloseFile();

Resulting document