WD: Use of "AND" and "OR" with Print Merge Selection Rules

ID: Q79266

The information in this article applies to:

SUMMARY

In Word, you can define "rules" that determine whether or not a specific record is included in a print merge. It is important to understand the difference between the English language meaning of "AND" and the logical meaning of "AND" to use these rules effectively.

MORE INFORMATION

The English language meaning of "AND" is equivalent to the logical meaning "OR." For example, suppose you have a data file that includes a STATE field and you want to perform a print merge of the records for the STATE fields of North Carolina and Washington. In English, you say "Include the records for North Carolina AND for Washington." Logically, however, the statement is written as "Include the records where STATE is North Carolina OR STATE is Washington."

When you use a logical "AND," both conditions must be true in order for the expression to be evaluated as true. If you write the statement "to include the records where STATE is North Carolina AND STATE is Washington," it is logically impossible for both conditions to be true in the same record. The state cannot be both North Carolina and Washington; it has to be one or the other. Below is a chart that describes how logical "AND" and "OR" are evaluated.

   If X=A OR Y=B        If EITHER is true, the record is included.
   If X=A AND Y=B       If BOTH are true, the record is included.

REFERENCES

"Microsoft Word for Windows User's Guide," version 2.0, pages 634, 670

KBCategory: kbusage KBSubcategory: kbfield kbmerge Additional query words: 2.0 winword winword2 word6 pmh print merge winword 7.0 word95 helper word7 word97

Keywords          : kbualink97 kbusage kbfield kbmerge 
Version           : 2.x 6.0 6.0a 6.0c 7.0 7.0a
Platform          : WINDOWS

Last Reviewed: February 6, 1998