Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine current page number in Word?
Message
From
05/05/2004 12:13:01
 
 
To
04/05/2004 15:43:23
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00900908
Message ID:
00901234
Views:
12
Hi Jim,

I think you use the "Information" property (Applies to either a Range or Selection object).

e.g.
Selection.Information(wdActiveEndPageNumber)

* Code Example
#DEFINE wdActiveEndPageNumber 3

LOCAL loWord, loDocument, lnPageNo
loWord = CREATEOBJECT("word.application")
loDocument = loWord.Open("Mydoc.doc")

* your own code to get wherever you are within the document

lnPageNumber = loDocument.Range.Information(wdActiveEndPageNumber)
* End code example

Seems to work for me anyway, hoep this helps.

Regards,

Ben
Ben Sugden

"Remember to enjoy hunting - and that means relishing the search for the product that has never been advertised or placed handily at the front of the shop; Life begins on the uppermost shelf, avoid guide books and top 10's like the plague." - Ramsey Dukes
Previous
Reply
Map
View

Click here to load this message in the networking platform