Robert L was telling us:
Robert L nous racontait que :
Thank you very much for your help.
I am not sure how David's answer helped you. You asked about VBA code to get
the current page number, and he told you how to insert a page number on a
page...
If that is what you wanted, then great, and I must say he has a very good
crystal ball!
If not, look up the Selection.Information property:
'_______________________________________
Dim AbsolutePageNum As Variant
AbsolutePageNum = Selection.Information(wdActiveEndPageNumber)
'_______________________________________
will return the page count from the beginning of the document
'_______________________________________
Dim RelativePageNum As Variant
RelativePageNum = Selection.Information(wdActiveEndAdjustedPageNumber)
'_______________________________________
will return the page count according to manual changes (if a section was
restarted at some numbers, etc.)
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org