Skip Page Two Under Certain Condition

T

tseskc

Dear All

A two pages word template for mail merge. Is it possible to skip the
printing of page two under a mentioned condition? For example, the Policy
Number is an odd number.

Thanks in Advance!!

regards
TSESKC
 
D

Doug Robbins - Word MVP

Not with mail merge alone. It should be possible using a macro if you can
predict where the Policy Number will appear in the document so that it's
value can be assessed by the macro.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
D

Dallas64

I have found the If-Then-Else field very powerful for this kind of thing.
You just have to manipulate it after you insert it.

Press the Insert Word Field button on your Mail Merge (there are probably 3
other ways to do this, but this button is the easiest). Select the field
that contains the condition you want. I am not sure it will recognize
odd/even as a condtion. But you could add a new field to you data source
that is 1/2 of your rule numer, and another one that is Roundup(1/2 of you
rule number). Select one of these fields and make it equal to 0, or anything
for that matter. This will be a dummy value that you will change in a
minute. Press OK.

Once the field is there, toggle to field codes. You can do this for just
this field by right clicking on it, or you can use ALT-F9 to toggle all field
codes in your document. If you don't toggle the field codes and try to mess
with the code I am about to explain, Word won't recognize what you are doing,
and you will get weird results.

When you see the field codes, you have more options. You ask two fields to
be equal to each other (such as the 1/2 field and the roundup(1/2) field -
which will descriminate between odds and evens. You can make a greater than,
less than, not equal to, or whatever. After the first comma, you get to type
or paste what you want when the condition is met, which can include text,
fields, or special characters such as page breaks. After the second comma,
you get to type or paste the text, fields, special characters you want if
the condition is not met.

You can even nest other If-Then-Else fields inside each other to get
multiple outcomes based on multiple conditions.

When you are done, toggle back from field codes to normal, and test all of
your conditions to see whether they act the way you like.

None of this requires a macro.
 

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