Microsoft KB Archive/75950

-

{| The information in this article applies to:
 * width="100%"|
 * Microsoft Word for the Macintosh, versions 3.0, 3.01, 3.02, 4.0, 5.0, 5.1, 5.1a

SYMPTOMS
When you use the print merge IF function for comparisons, the data returned may be different from what you expect.

CAUSE
In your data file, a particular field contains text with some records and numbers with other records.

MORE INFORMATION
When the comparison is set up to select a number greater or less than another value, such as < &quot;70&quot;>> < > < >, fields that contain text will also be printed. This is because Word considers all text to have a greater &quot;value&quot; than numbers.

To instruct Word to return only numeric values, use two IF statements: one that restricts text and one that returns the correct numeric value. For example:

<> < &quot;70&quot;>> < > < > < > Requesting text less than A returns no text, and requesting scores greater than 70 returns only the scores with numeric values over 70. If the comparison information does not include quotation marks, the error message &quot;Not a valid integer for comparison&quot; will appear.

For example, the statement

< 70>> < > < > should read < &quot;70&quot;>> < > < > For more information on print merging and IF statements, please see the following articles in the Microsoft Knowledge Base: ARTICLE-ID: Q141008 TITLE    : WD: How to Force Text to Start at Same Line in Merged Letters

ARTICLE-ID: Q122505 TITLE    : WD: Selecting &quot;(None)&quot; Resets Filter Comparison

ARTICLE-ID: Q113314 TITLE    : WD: Word Err Msg: Word Could Not Parse Your Query Options

ARTICLE-ID: Q97795 TITLE    : WD: Using Print Merge to Create a List Sorted by Category

ARTICLE-ID: Q66612 TITLE    : WD: Second Expression in Conditional Print Merge Statement

ARTICLE-ID: Q63687 TITLE    : WD: Comparing Dates During Print Merge
 * }

-

Last reviewed: February 5, 1998

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.