ID: Q29193
The information in this article applies to:
In Microsoft Word, you can print a form letter for records that contain only certain data.
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).
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>>
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:
<<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
2. On the Format menu, click Section.
3. 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 : WINDOWS:6.0,6.0a,6.0c,7.0,7.0a;MACINTOSH:3.0,3.01,3.02,4.0,5.0,5.1,5.1a,6.0 ,6.0.1,6.0.1a
Platform : MACINTOSH WINDOWS
Issue type : kbhowto
Last Reviewed: September 19, 1998