I'm not sure there is a simple method. You could use the constant that returns the arabic number for that section
Selection.Range.Information(wdActiveEndAdjustedPageNumber)
Do you want the formatted page number (what a field would return if it had no switches added) or an Arabic number? It could be alphabetic or roman numerals for instance.
I think it takes a lot of code to work out the applicable header/footer contents and would probably be easier to insert a Page Field on the page and get that value. A H/F might be linked to preceding H/F and pagenum fields can be in floating text boxes - it gets very ugly to query that info.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|