向段插入当前文档页数
这种方法没有任何参数
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvarolements=ODocument.GetEplement0oParagraph.AddText("First page")!oParagraph.AddPageBreak()!oParagraph.AddText("Second page")!oParagraph.AddPageBreak()!oParagraph.AddText("Third page")!varosections=ODocument.Getfinalsectionvaroheader=osection.getheaderoledges=oheader.GetElement0adText (Page#)oParagraph.AddPageNumber()!OFOTER=Osection.GetFOTEROdeptes=OFOTER.GetEplement0adText (Page#)oParagraph.AddPageNumber()!builder.SaveFile("docx", "AddPageNumber.docx")!builder.CloseFile();