Reply
 
Thread Tools Display Modes
  #1   Report Post  
EHPorter
 
Posts: n/a
Default Testing for existence of Next Record in Merge

I use the {NEXT} field in Word Mailmerge often to list multiple items. The
problem is that I can not find a way for Word to determine that it should
stop merging when it runs out of records. Any suggestions.

Here is an example of the problem. My merge document will look something
like:

This is part number: {Mergefield "Part Number"} {Next}
This is part number: {Mergefield "Part Number"} {Next}
This is part number: {Mergefield "Part Number"} {Next}

This works if there are three records, no more and no less. If there are
more than three, the remainder are omitted. If there is only one record,
the merge looks something like this:

This is part number: XFG5678
This is part number:
This is part number:

Ideally, there would be a way to check for the existence of a "next record"
and terminate or branch the merge if one did not exist.

Thanks for any suggestions.


  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Testing nest record etc. is quite hard and may be impossible, depending on
what you are trying to do. If you are trying to produce a "list sorted by
category",
a. Word isn't very good at it - you might be better off using a database
program such as Access
b. the best approach using Word that does not require VBA coding is
probably the one described at

http://support.microsoft.com/default...b;en-us;294686

which avoids NEXT fields altogether.

c. if you are using Word 2002/2003 you may be able to use VBA and Word's
Mailmerge Events, but I wouldn't count on that being easy.

Peter Jamieson


"EHPorter" wrote in message
...
I use the {NEXT} field in Word Mailmerge often to list multiple items. The
problem is that I can not find a way for Word to determine that it should
stop merging when it runs out of records. Any suggestions.

Here is an example of the problem. My merge document will look something
like:

This is part number: {Mergefield "Part Number"} {Next}
This is part number: {Mergefield "Part Number"} {Next}
This is part number: {Mergefield "Part Number"} {Next}

This works if there are three records, no more and no less. If there are
more than three, the remainder are omitted. If there is only one record,
the merge looks something like this:

This is part number: XFG5678
This is part number:
This is part number:

Ideally, there would be a way to check for the existence of a "next
record" and terminate or branch the merge if one did not exist.

Thanks for any suggestions.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge - Next Record If Statement HiramPat Mailmerge 5 April 22nd 05 04:03 PM
merge is only merging every 3rd record - how do i fix it? johnette Mailmerge 1 February 24th 05 10:28 PM
Specific Email Merge w/ Specific Attachements Mark B Mailmerge 9 February 21st 05 05:10 AM
How to choose your own record deliminators in mail merge? GMed Mailmerge 0 January 21st 05 03:43 PM
How do I revert to the first record in a merge document in Word? d291173 Mailmerge 3 January 19th 05 10:16 AM


All times are GMT +1. The time now is 07:31 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"