abbarition
Tue Feb 21 10:37:31 CST 2006
This will work great. Thanks so much!
"Jean-Guy Marcil" wrote:
> abbarition was telling us:
> abbarition nous racontait que :
>
> > I'm sure this is fairly simple, but for some reason I can't seem to
> > find it. Does anyone know the code to find the current page number?
> >
> > This is what I am using it for: I have code that will run on exit of
> > all the fields on my word form. However, I need the code to vary
> > slightly depending on the page the field is on. If I can find the
> > page number, I can have the code run the necessary changes.
> >
> > Thanks in advance!
>
> Play around with these examples:
>
> MsgBox Selection.Information(wdActiveEndPageNumber)
> MsgBox Selection.Information(wdActiveEndAdjustedPageNumber)
> MsgBox ActiveDocument.Fields(1).Result.Information(wdActiveEndPageNumber)
>
> The first two will return the page number the currently selected text is on.
> The third will return the page number for the first field in the document.
>
> wdActiveEndAdjustedPageNumber returns the page number as displayed in the
> status bar (which might not be the actual physical page number if you
> restarted numbering at a new number in the current section) whereas
> wdActiveEndPageNumber returns the physical page number according the count
> of pages in the document.
>
> --
> Salut!
> _______________________________________
> Jean-Guy Marcil - Word MVP
> jmarcilREMOVE@CAPSsympatico.caTHISTOO
> Word MVP site:
http://www.word.mvps.org
>
>
>