AddText
Adds a 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 oBlockLvlSdt = Api.CreateBlockLvlSdt();
oBlockLvlSdt.GetContent().GetElement(0).AddText("This is a block text content control.");
oDocument.AddElement(0, oBlockLvlSdt);
builder.SaveFile("docx", "AddText.docx");
builder.CloseFile();
Resulting document