Home > Topics > word > body text

Practical Word skills sharing: quickly and batch delete spaces and empty lines

青灯夜游
Release: 2022-08-22 10:12:51
forward
23779 people have browsed it

In the previous article "Practical Word Tips Sharing: How to Batch Clear English in Documents", we introduced the method of batch deleting all English in documents. Today we will continue to talk about Word search and replace techniques, and introduce how to delete spaces and blank lines in batches. Come and take a look!

Practical Word skills sharing: quickly and batch delete spaces and empty lines

In our daily work, we often encounter the following two problems:

For example, there are many plain text materials downloaded from the Internet or copied to Word. , the most annoying thing is that there are a lot of spaces or empty lines (carriage returns) in the document. The format is very confusing and does not meet the typesetting requirements at all, as shown in the picture. If you want to delete them line by line, it will be time-consuming and laborious.

Practical Word skills sharing: quickly and batch delete spaces and empty lines

In order to quickly make the text standardized and tidy, the effect is as shown in the figure.

Practical Word skills sharing: quickly and batch delete spaces and empty lines

Next, let me teach you two tips that will take you just a few seconds to easily delete all spaces and empty lines.

1. Delete spaces in batches

(1) Click [Start]-[Edit]-[Replace] button or press the [Ctrl H] key combination to open the "Find and Replace" dialog box, position the mouse cursor in the "Find What" text box, and then click the "More" button.

(2) Expand the "Replace" column, click the "Special Format" button, and select the "Blank Area" option in the pop-up menu.

(3) Click the "Replace All" button, click the "OK" button in the "All Completed" prompt box, and all spaces will be deleted.

Practical Word skills sharing: quickly and batch delete spaces and empty lines

2. Delete blank lines in batches

In Word, the carriage return character is also called a paragraph mark , a carriage return character indicates the end of a line, so deleting a blank line means deleting redundant carriage returns (paragraph marks). Simply put, it is to replace multiple consecutive carriage returns (paragraph marks) with one carriage return character. Method As follows:

(1) Open the "Find and Replace" dialog box, position the mouse cursor in the "Find What" text box, and then click the "More" button.

(2) Expand the "Replace" column, click the "Special Format" button, and select the "Paragraph Mark" option in the pop-up menu. At this time, you will find that ^p is automatically added to the "Find content" text box. (But it should be noted here that a blank line is formed by multiple consecutive carriage returns (paragraph marks)). Therefore, we need to enter two ^p^p in [Find content] to find two consecutive paragraph marks; and enter 1 ^p in the [Replace with] text box means replacing the found content with a paragraph mark.

(3) Click the "Replace All" button, click the "OK" button in the "All Completed" prompt box, and all blank lines will be deleted.

Practical Word skills sharing: quickly and batch delete spaces and empty lines

Tips: If you enter 1 ^p in "Find content", or the content of "Replace with" is If empty, all carriage returns (paragraph marks) in the document will be deleted and all content will become a paragraph.

On the contrary, if we want to add a blank line, we can reverse the replacement content:

Practical Word skills sharing: quickly and batch delete spaces and empty lines

In addition, if the blank line in the document is not a carriage return style Paragraph mark, but the manual line break of the downward arrow (that is, the blank line formed by pressing the Shift Enter key), as shown in the figure, what should I do?

Practical Word skills sharing: quickly and batch delete spaces and empty lines

For blank lines formed by manual line breaks, you can select the "Manual Line Wrap (L)" option in "Special Characters" twice when replacing, that is, "Find Contents" "Enter 2 "^l^l"; replace it with "^P", and the blank line can be deleted.

Practical Word skills sharing: quickly and batch delete spaces and empty lines

Recommended tutorial: "Word Tutorial"

The above is the detailed content of Practical Word skills sharing: quickly and batch delete spaces and empty lines. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:itblw.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template