Conditional Number of Records - Duplicate entries printing

B

Bazza

I have created a mail merge document by basing it on this link....
http://support.microsoft.com/default.aspx?scid=kb;en-us;211303

All well and good, apart from my item details. When I click the Merge
button, everything works fine, until I get to the last line on each page and
it is duplicated.

The code I have used is as follows:

Header: {nextif{set duplicate {Mergefield Check} = "1"} {Mergefield
Personnel_Area}


Item: {Mergefield Initial} {Mergefield Last_Name}
Item: {NextIf{Mergefield Check } = ""} {Mergefield Initial} {Mergefield
Last_Name}
Item: {NextIf{Mergefield Check } = ""} {Mergefield Initial} {Mergefield
Last_Name}
Item: {NextIf{Mergefield Check } = ""} {Mergefield Initial} {Mergefield
Last_Name}
Item: {NextIf{Mergefield Check } = ""} {Mergefield Initial} {Mergefield
Last_Name}
Item: {NextIf{Mergefield Check } = ""} {Mergefield Initial} {Mergefield
Last_Name}
Item: {NextIf{Mergefield Check } = ""} {Mergefield Initial} {Mergefield
Last_Name}
Item: {NextIf{Mergefield Check } = ""} {Mergefield Initial} {Mergefield
Last_Name}
Item: {NextIf{Mergefield Check } = ""} {Mergefield Initial} {Mergefield
Last_Name}

I have a colum headed Check, and it is flagged with a 1 if it is the last
record for the Area.

It all works apart from duplicating the last entry to the bottom of the
page.... I have tried <>1 or = "" but get the same result either way.

Any thoughts??

Many thanks.
 
P

Peter Jamieson

Word isn't very good at this - if possible produce your report in Access or
similar.

It looks as if your approach is more similar to the one described in

http://support.microsoft.com/default.aspx?scid=kb;en-us;212375

- if so, you need to follow their pattern very closely. You have to be
really careful with NEXTIF and SKIPIF because it is easy to get the wrong
idea about what they actually do. For example, when you use NEXTIF and the
condition fails, all that happens is that Word does not read the next
record. In that case, if you have MERGEFIELD fields after the NEXTIF, they
will display exactly the same info. as the MERGEFIELD fields just before the
NEXTIF.

Peter Jamieson
 

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