Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / October 2004

Tip: Looking for answers? Try searching our database.

Conditional Number of Records - Duplicate entries printing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bazza - 25 Oct 2004 12:29 GMT
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.
Peter Jamieson - 25 Oct 2004 19:40 GMT
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

>I have created a mail merge document by basing it on this link....
> http://support.microsoft.com/default.aspx?scid=kb;en-us;211303
[quoted text clipped - 36 lines]
>
> Many thanks.
Paul Baynton - 26 Oct 2004 23:01 GMT
Bazza,

If you can make the example in
http://support.microsoft.com/default.aspx?scid=kb;en-us;211303
work, its definitely the better method to use.
Using a key field comparison to determine where the different areas end
instead of a flag in the data makes everything a lot easier to follow and
understand.
If you need any more help, please post again to this thread.

Thanks
Paul

> Word isn't very good at this - if possible produce your report in Access or
> similar.
[quoted text clipped - 53 lines]
> >
> > Many thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.