AddText
Adds text to the current content control.
Parameters:
Name |
Type |
Description |
sText |
String
|
The text which will be added to the content control. |
Returns:
- Type
-
boolean
Example
Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
var oInlineLvlSdt = Api.CreateInlineLvlSdt();
oInlineLvlSdt.AddText("This is an inline text content control.");
oParagraph.AddInlineLvlSdt(oInlineLvlSdt);
builder.SaveFile("docx", "AddText.docx");
builder.CloseFile();
Resulting document