Conditional merge based on page number

D

Dave

Hi

Does anyone know if there is a way to conditionally print
a footer message based on the page number.

As Word uses {PAGE} as the variable in the footer, I've
tried to compare the value of {PAGE} (not ure if this is
the ight variable to use) against the page number but with
luck.

Can any assist on this.

TIA
Dave
 
P

Peter Jamieson

( IF { PAGE } = 3 "three" "not three" }

should work, but because the field is an IF field, during a merge, Word will
resolve the field.

So you need to use something that prevents the resolution occuring, and you
can do it using e.g.

{ ={ PAGE }-3 \#"'more than three';'less than three';'three'" }
 
C

Cindy M -WordMVP-

Hi Dave,
Does anyone know if there is a way to conditionally print
a footer message based on the page number.

As Word uses {PAGE} as the variable in the footer, I've
tried to compare the value of {PAGE} (not ure if this is
the ight variable to use) against the page number but with
luck.
That certainly would be the correct approach. And I think
you'll find an article for this on the mvps.org/word website
(to display a particular text on the last page).

You are using an IF field? And being sure to use Ctrl+F9 to
insert the pairs of field brackets you need? It should
roughly look like this:

{ If { PAGE } = 2 "This text on page 2" "Else this text on
the other pages" }

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 
D

dave

Hi

Thanks for this.

I've tried your suggestion by inserting the information
into my footer, however when I mailmerge the whole "IF {
PAGE} ..." condition appears in the footer.

Any ideas?

Thanks
 
C

Cindy M -WordMVP-

Hi Dave,
I've tried your suggestion by inserting the information
into my footer, however when I mailmerge the whole "IF {
PAGE} ..." condition appears in the footer.
You MUST use Ctrl+F9 to insert the { field brackets }.
These may NOT be typed as symbols from the keyboard.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 
D

Dave

Hi

Okay, I've used Ctrl-F9 to insert the fields into my
footer but still I'm not getting the desired result.

The following is what I have setup in my footer
{ IF { PAGE } = 2 "Two" "NOT Two"}

The above statement produces "NOT Two" on every page even
though I'm merge five pages.

Does anyone have any thoughts on the matter.

TIA
Dave
 
P

Peter Jamieson

Have your tried the suggestion I made for when you use mailmerge:

{ ={ PAGE }-3 \#"'more than three';'less than three';'three'" }
 
D

Dave

Hi Peter

Yes, I've tried the attached suggestion and it just
prodcues the text in the footer.

I've set this up using Ctrl-F9 for both sets of braces and
typed the rest of the information as it stands, but to no
avail.

Any ideas.

TIA
 
P

Peter Jamieson

OK, I can't replicate this problem here and don't have another idea on how
to fix it but am wondering
a. exactly which version of Word you have (i..e. the full version number
from the Word Help|About menu item
b. what type of merge you are doing (Form Letter, Catalog, Directory).
c. whether your merge main document consists of 1 page and you have 5
records - i.e. I just want to be certain that your output page numbering is
PAGE 1, 2, 3, 4, 5 and not PAGE 1,1,1,1,1, which it normally would be for a
Form Letter merge with a 1-page letter.
 
C

Cindy M -WordMVP-

Hi Dave,
Okay, I've used Ctrl-F9 to insert the fields into my
footer but still I'm not getting the desired result.

The following is what I have setup in my footer
{ IF { PAGE } = 2 "Two" "NOT Two"}

The above statement produces "NOT Two" on every page even
though I'm merge five pages.
Ahhhh, mail merge. I missed that in your original question.
I'm still not certain what you're trying to achieve, but
let's see if this explanation will get you any further:

If you're NOT creating a catalog/directory type of mail
merge, then every merge record generates a new SECTION. And
by default, page numbering will restart at each section. So,
you could
- use { SECTION } instead of {PAGE} in your formula
(assuming that each record generates a single page/section)

- Ctrl+A, Insert/page number/Format and change the numbering
to "continue from previous section"

- perhaps change to a Catalog type of mail merge

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top