Microsoft KB Archive/58045

Word: Extra Line Printed Even with Correct IF Statement Usage

PSS ID Number: Q58045 Article last modified on 11-02-1994

4.00 5.00 5.50 6.00

MS-DOS

= SUMMARY =

An IF statement used in a print merge to suppress blank lines may not suppress blank lines if a database file is used that has been created in another application, saved as comma delimited and the empty fields are indicated by the use of an empty space between quotes. The empty space between the quotes is interpreted by word as a character, thus is not suppressed as being blank.

The easiest way to correct the database file in Word is to use the Replace command to replace every occurrence of a quotation mark, space, quotation mark (&quot; “) with a two quotation marks (”&quot;).

= MORE INFORMATION =

This problem can be demonstrated if a merge statement is set up exactly as it appears on Page 345 of the Word version 5.00 “Using Microsoft Word” manual (see below):

<>< > <>< > < < >, < > < >

If the company field is empty, the line containing that field will be skipped (not printed). However, if it is set to &quot; &quot; (quotation mark, space, quotation mark), the IF statement will report that the field does exist and print the space (from inside the quotation marks) and a new line.

KBCategory: kbother KBSubcategory: kbmerge Additional reference words: ============================================================================= Copyright Microsoft Corporation 1994.