Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve current page number in Word

Status
Not open for further replies.

rguglielmon

Technical User
Jan 6, 2003
12
0
0
US
How do I retrieve the current page number in a document in Word? I've looked through the object model and see no objects, properties or methods that do this. Evidently, Word does not process pages as objects.
 
Why not use the field code {PAGE} in the document (Insert,Field,Numbering Category,Page)?
Barborne
Worcester
UK
 
Sounds like the status bar option is turned off. Go to menu item Tools: Options, and make sure View tab is on top; check Status Bar box. Then the page on screen has its number at the bottom of the screen.

 
The field code would be useful if I just wanted to display the page number, but what I really need is to access the current page number programmatically in a VB macro.

Let me tell you a little about the project I'm doing and why I need this. I work in a training organization and we are developing a Word template for instructor guides. The format will have the page from the student handout manual on the right and the corresponding instructor notes on the left. One requirement is that both pages display the same page number. I know I can calculate the page number to display with a simple formula if I could access the actual page number. I just can't see how to get the page number as an integer that I could manipulate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top