How To Count Number of Pages

J

Jason

I'm assuming there is a simple command to count the number of pages in a
document, similar to [ActiveDocument.Paragraphs.Count], but for pages instead
of paragraphs. Am I correct? If so, what is the code?

Thanks,

Jason
 
J

Jezebel

ActiveDocument.BuiltinDocumentProperties(wdPropertyPages)

Bear in mind that there's a qualitative difference: values like paragraphs,
words, characters, etc are inherent attributes of the content of the
document; pages is a derived value, a function of both the content, the page
set-up, and the currently selected printer.
 
J

Jason

Thank you very much for the info. Works like a charm.

Jezebel said:
ActiveDocument.BuiltinDocumentProperties(wdPropertyPages)

Bear in mind that there's a qualitative difference: values like paragraphs,
words, characters, etc are inherent attributes of the content of the
document; pages is a derived value, a function of both the content, the page
set-up, and the currently selected printer.


Jason said:
I'm assuming there is a simple command to count the number of pages in a
document, similar to [ActiveDocument.Paragraphs.Count], but for pages
instead
of paragraphs. Am I correct? If so, what is the code?

Thanks,

Jason
 

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