Rem:
To count the pages in MSWord document, we need to follow following steps:
1 Create an object of Word Application.
2 Open the required Word document using the open() function of Documents collection of Word document. This function returns the Word.Document object.
3 Cal the ComputeStatistics fumction on Word.Document object passing it an enum WdStatistic with value equal to wdStatisticPages. This function will return the number of pages in the opened word document.
本文介绍了一种通过C#编程语言使用Microsoft.Office.Interop.Word命名空间来打开并计算Word文档中总页数的方法。该方法首先创建Word应用程序对象,然后打开指定的Word文档,并调用ComputeStatistics函数获取文档的页数。
2536

被折叠的 条评论
为什么被折叠?



