添加元素

添加元素(nPos, oEplement)

添加段或表或块Lvl内容控件

参数:

名称 类型 描述性
NPOs 数组

位置当前元素添加

元素分解 文件元素

文档元素添加到当前位置

返回时间 :

方法不返回数据

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvarodeptes=api.Createlevar ORun=api.CreateRunORun.AddTextoRun.AddTabStop()!oRun.AddText("" + oParagraph.GetElementsCount())!oRun.AddLineBreak()!oParagraph.AddElement(oRun)!ORun.AddTextoRun.AddTabStop()!oRun.AddText("" + oParagraph.GetElementsCount())!oDocument.AddElement(0, oParagraph)!builder.SaveFile("docx", "AddElement.docx")!builder.CloseFile();

结果文档