View Single Post
 
Old 06-22-2021, 04:52 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote