Testing for existence of Next Record in Merge

E

EHPorter

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.
 
P

Peter Jamieson

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.aspx?scid=kb;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
 

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