Re: Macro which will run if doc goes to more than one page



You don't need a macro for this, you need a conditional field in the first
page footer of the document:

{IF {NUMPAGES} > 1 "Continued on next page ..." }

or if you have a running footer you could conditionally put it on the first
page only

{IF { PAGE } = 1 "{IF {NUMPAGES} > 1 "Continued on next page ..." }"}

If the document may run to more than two pages, you would need a variation

{ IF { PAGE } < { NUMPAGES } "{ IF { NUMPAGES } > 1 "Continued on next page
...." }" }

so that it doesn't print on the last page

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Jacqui wrote:
I have a document template which may or may not be two or more pages
long but in some case only 1. What I want to do is create a macro
that will show text eg 'Continued on next page ...) only if the
document goes to page 2 and beyond. I can't do it with a macro prompt
button because in the template there is only one page. I'm not
experience enough to write code such as "if doc pages are more than 1
then .... etc etc. Can anyone help?

thanks


.


Loading