添加页数

adPage序号spiRun}

向段插入当前文档页数

参数:

这种方法没有任何参数

返回时间 :

类型
spiRun

实例

拷贝代码
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();

结果文档