AddElement
function AddElement(oElement: ParagraphContent = null, nPos: number = null): boolean
Description
Adds an element to the inline text content control.
Parameters
The document element which will be added at the position specified. Returns false if the type of oElement is not supported by an inline text content control.
- nPos
number
null The position of the element where it will be added to the current inline text content control. If this value is not specified, then the element will be added to the end of the current inline text content control.
Returns
boolean
Try It
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
var oInlineLvlSdt = Api.CreateInlineLvlSdt();
oParagraph.AddInlineLvlSdt(oInlineLvlSdt);
var oRun = Api.CreateRun();
oRun.AddText("This is an inline text content control with a text run in it.");
oInlineLvlSdt.AddElement(oRun, 0);