Thank you very much for your help.
regards,
Robert
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.)

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Robert L - 13 Dec 2004 09:31 GMT
Hi Jean-Guy,
You are right. He answered something else, but I was quite busy at the time
I was reading the answer and moreover, in the meantime I decided not to
include page numbers in my macro output. So I just thanked him for his
answer. Anyway I see you are a good reader :) and a man who wants to give
the correct answer to the question.
I will try your procedure for sure and use in some future macros.
Thank you very much for your advice and help. I appreciate this much.
Regards,
Robert