G
Giles
My page footers need to include references to a range of pages x-y, and need
to state "... on pages x to y" or "... on page x" depending upon whether the
range is several pages or a single page.
I can achieve this using the IF statement and testing bookmarks:
{IF {PAGEREF pageref001} <> {PAGEREF pageref002} "pages {PAGEREF pageref001}
to {PAGEREF pageref002}" "page {PAGEREF pageref001}"}
This works perfectly well in the body of the page. If it is in the header or
footer then it works fine on screen; and it works fine if you print in
reverse order; but if you print without the reverse order option then it only
works if the bookmarks occur earlier in the document. If the pageref refers
to a bookmark later than the current page (by which I mean the page on which
the pageref statement appears), the current page number seems to be used
instead.
It happens with Word 2003 and Windows XP, and I have produced a test
document that demonstrates it.
to state "... on pages x to y" or "... on page x" depending upon whether the
range is several pages or a single page.
I can achieve this using the IF statement and testing bookmarks:
{IF {PAGEREF pageref001} <> {PAGEREF pageref002} "pages {PAGEREF pageref001}
to {PAGEREF pageref002}" "page {PAGEREF pageref001}"}
This works perfectly well in the body of the page. If it is in the header or
footer then it works fine on screen; and it works fine if you print in
reverse order; but if you print without the reverse order option then it only
works if the bookmarks occur earlier in the document. If the pageref refers
to a bookmark later than the current page (by which I mean the page on which
the pageref statement appears), the current page number seems to be used
instead.
It happens with Word 2003 and Windows XP, and I have produced a test
document that demonstrates it.