Microsoft KB Archive/27622

Removing Extra Carriage Returns from ASCII Files

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

4.00 5.00 5.50 6.00

MS-DOS

= SUMMARY =

The following is an easy way to get rid of the returns that appear at the end of every line of an imported ASCII file without deleting carriage returns at the end of paragraphs.

= MORE INFORMATION =

If a carriage return has been used to create a space between paragraphs, the Replace command can be used to find and “save” these carriage returns before deleting the extra carriage returns at the end of every line. To do this, follow the steps below:


 * 1) Choose Replace and enter “pp” in the “text:” field (the “^p” stands for the paragraph mark; see Page 70 of the “Microsoft Word Reference” manual). In the “with text:” field, enter a unique character sequence (for example, &quot;*&quot; or “###”). These characters will be removed later. In the meantime, they will mark the ends of paragraphs.
 * 2) Choose Replace and enter “^p” in the “text:” field, and replace it with either a space or nothing. If there is a space before or after the paragraph mark, enter nothing in the “with text:” field. If there is no space before or after each paragraph mark, enter a space in the “with text:” field.
 * 3) Choose Replace and enter the unique character sequence (for example, the &quot;*&quot; or “###”) in the “text:” field, and enter “pp” in the “with text:” field. This will restore the paragraph marks. If you want to remove the blank lines between paragraphs, enter “^p” instead of “pp” in the “with text:” field.

KBCategory: kbother KBSubcategory: Additional reference words:

=
================================================================ Copyright Microsoft Corporation 1994.