How to Merge Every Nth Record
PSS ID Number: Q102440
Article last modified on 07-14-1994

2.00 2.00a 2.00a-CD 2.00b 2.00c

WINDOWS


-------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b,
   2.0c
-------------------------------------------------------------------

SUMMARY
=======

In Word for Windows, you can place fields in a document that allow you
to merge every nth record. For example, you can merge every other
record or every thirty-fourth record. This is useful if you are
mailing a survey and need to send letters to a sample of recipients.

MORE INFORMATION
================

Before inserting these fields in the document, be sure that hidden
text is turned on.

To add fields that will allow you to merge every nth record:

1. At the beginning of the document, insert the following field

      {¬=mod({¬mergerec},n)}

   where "n" is the multiple of the records you want to print. Use the
   number 2 if you want to merge every other record. Use the number 34
   to merge every thirty-fourth record.

2. Highlight the entire field and apply a bookmark.

3. Highlight the entire field and apply hidden formatting.

4. To the right of the previous field, insert this field

      {¬skipif bookmarkname <> 0}

   where "bookmarkname" is the name of the bookmark that you applied
   in step 2.

   The two fields should appear like this:

      {¬=mod({¬mergerec},n)}{¬skipif bookmarkname <> 0}

The first record to print is the record that has the number you specified.
If "n" is 34, record number 34 will be the first record that prints. Record
68 will be the next, and so on. The first record in the data file will not
be printed (unless you use "1" for n).

The hidden field will be present in the merged document but will not
print. It will be visible only if Hidden Text is showing.

How It Works
------------

The first field determines whether or not the current record is evenly
divisible by n. If there is a remainder from the division, the SKIPIF
field ignores the record.

Additional reference words: 2.00 2.00a 2.00a-CD 2.00b 2.00c w4wfield
winword

=============================================================================

Copyright Microsoft Corporation 1994.
