WD: Print Merge Only Certain Records from a Data Document

ID: Q29193


The information in this article applies to:
  • Microsoft Word for the Macintosh, versions 3.0, 3.01, 3.02, 4.0, 5.0, 5.1


SUMMARY

In Microsoft Word, you can print a form letter for records that contain only certain data.


MORE INFORMATION

To do this you can specify a range of records in the Merge dialog box, or you can use one of the following methods (use the method appropriate for your version of Word).

Word for the Macintosh 5.0, 5.1

Use an IF instruction to test each record before printing. For example, if you only want to print those records that have "NY" for a state field, set up the main document as follows:

   <<Data filename>><<IF state="NY">>
   .
   .   Text of form letter goes here, with other merge
   .   instructions.
   .
   <<ENDIF>> 

Word for the Macintosh 3.0, 4.0

Use an IF instruction to test each record before printing. For example, if you only want to print those records that have "NY" for a state field, do the following:

  1. Set up the main document as follows:


  2. 
          <<Data filename>><<IF state="NY">>
          .
          .   Text of form letter goes here, with other merge
          .   instructions. Note the manual page break
          .   (SHIFT+ENTER) that comes before the ENDIF.
          .
          --------------------------------------------------------
          <<ENDIF 
  3. On the Format menu, click Section.


  4. Under Section Start, click No Break. Click OK.


In Word versions 4.0 and 3.0, it is important to remove the closing >> after the ENDIF.

Note that the ENDIF must be on the last line of the document; otherwise, extra blank lines will be printed for those records that do not meet the screening criteria. A manual page break (SHIFT+ENTER) must immediately precede the ENDIF instruction so that each form letter will be printed on a separate page.

Additional query words: selected

Keywords : kbualink97 kbfield kbmerge macword
Version : MACINTOSH:3.0,3.01,3.02,4.0,5.0,5.1
Platform : MACINTOSH
Issue type : kbhowto


Last Reviewed: October 19, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.