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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top