Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2007

Tip: Looking for answers? Try searching our database.

How to get the current page number?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew - 09 Mar 2007 22:50 GMT
Hello, friends,

Probably this is a trivial question:

How to get the current page number of an open document using
Microsoft.Office.Interop.Word?

I looked up all methods/properties and could not find one that looked like.

Thanks a lot.
Jean-Guy Marcil - 10 Mar 2007 02:04 GMT
Andrew was telling us:
Andrew nous racontait que :

> Hello, friends,
>
[quoted text clipped - 5 lines]
> I looked up all methods/properties and could not find one that looked
> like.

In VBA you would use the Information property:

   MsgBox Selection.Information(wdActiveEndPageNumber)
   MsgBox Selection.Information(wdActiveEndAdjustedPageNumber)

where the first one gives you the absolute page count in the document and
the second the page number as defined in the Page Number formatting dialog
(Insert menu > Page Numbers...)

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.