Get num of pages from word

G

Giuliano

Hello,

I'm a newby and I need some info on VBA in word

I need to write a macro to get how many pages are present in the currently
opened document (total pages and pages per section)

Is this possible ?

Many thanks
Giuliano
 
C

Cindy Meister -WordMVP-

Hi Giuliano,
I need to write a macro to get how many pages are present in the currently
opened document (total pages and pages per section)
For the total pages, you can use the Statistics property, or the Information
property.

To get the total number of pages in a section, you'd want to use the
Information property on the section's range, along with some calculations,
so that you can subtract the preceding ranges' numbers from the one you're
currently checking.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
G

Giuliano

Many thanks Cindy I solved my problem !

"Cindy Meister -WordMVP-" <[email protected]> ha scritto nel
messaggio | Hi Giuliano,
|
| For the total pages, you can use the Statistics property, or the
Information
| property.
|
| To get the total number of pages in a section, you'd want to use the
| Information property on the section's range, along with some calculations,
| so that you can subtract the preceding ranges' numbers from the one you're
| currently checking.
 

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