Returns an element by its position in the document.
Name | Type | Description |
nPos | number | The element position that will be taken from the document. |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); var oParagraph = oDocument.GetElement(0); var oRun = Api.CreateRun(); oRun.AddText("This is just a sample text. Nothing special."); oParagraph.AddElement(oRun); builder.SaveFile("docx", "GetElement.docx"); builder.CloseFile();