AddElement
function AddElement(oElement: DocumentElement = null, nPos: Number = null): boolean
Description
Adds a paragraph or a table or a block content control to the current container.
Parameters
The type of the element which will be added to the current container.
- nPos
Number
null The specified position.
Returns
boolean
Try It
var oDocument = Api.GetDocument();
var oBlockLvlSdt = Api.CreateBlockLvlSdt();
var oParagraph = Api.CreateParagraph();
oParagraph.AddText("This is a block text content control.");
oBlockLvlSdt.AddElement(oParagraph, 0);
oDocument.AddElement(0, oBlockLvlSdt);