How to get the number of pages in a Word document

H

Han Koster

I am writing a macro to print the pages in a different order
For that I need to know how many pages there are
But I can find no property that tell me this
The VBA help says that I should use the menu Tools/WordCount, but that
action opens a dialog window with the information I need, but when I record
a macro with this action, the macro is empty.
Has anybody a suggestion how to get this information?

Thanks,
Han
 
H

Han Koster

OK, found it myself afterall
In case anyone else wants the answer:

ActiveDocument.Content.Information(wdNumberOfPagesInDocument)
 
Top