Get Started
Usage API

Push

Push(oElement) → { bool }

Push a paragraph or a table or BlockLvl content control to actually add it to the document.

Parameters:

Name Type Description
oElement DocumentElement

The type of the element which will be pushed to the document.

Returns:

Type
bool

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oBlockLvlSdt = Api.CreateBlockLvlSdt();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("This is a block text content control.");
oBlockLvlSdt.Push(oParagraph);
oDocument.AddElement(0, oBlockLvlSdt);
builder.SaveFile("docx", "Push.docx");
builder.CloseFile();

Resulting document