Visit Map

Thursday, April 26, 2007

To find Number of pages in word document Programatically

To compute no of pages in a word document you can use the following
ActiveDocument.ComputeStatistics(wdStatisticPages,1)
This gives you the number of pages in the word document
Hope this helps

2 comments:

World of Photography said...

You can also get the no. of pages by using Selection.Information(wdNumberOfPagesInDocument).

Anonymous said...

This is great info to know.