RemoveAllElements

RemoveAllElements() → { boolean }

Removes all the elements from the current inline text content control.

Parameters:

This method doesn't have any parameters.

Returns:

Type
boolean

Example

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

Resulting document