Remove extra spaces. Another lesson on text formatting in Word. You will spend only a couple of minutes studying it, and you will win many hours and nerves. It is better to spend this time on something useful and interesting. If you often have to work with texts in Word, then you simply need to know the most necessary techniques for quickly editing and formatting text. Otherwise, your work may become not only hated, but also unfeasible. But you can work with pleasure, getting satisfaction from the work done. Imagine that you need to edit the text on 500 pages in a couple of hours. Represented? Is the desire gone yet? And for some, this is not just a job, but also an income. So, so that this income does not become a nightmare, you just need to know the basic settings and commands text editor. It's not that hard to remember them.

You can simply make a small cheat sheet for yourself and refer to it if necessary.

I will describe on the example of a text word editor 2010, but the same can be applied to Word 2007.

In the process of creating an article for a website, I often write quickly everything in a row, until I was interrupted by a “brilliant” idea, and then I edit the text with everyone possible ways. So sometimes I put so many gaps ... As long as I hold the spacebar, so many of these gaps will be molded. But then I just do this procedure, and everything falls into place. How to do it?

There are two ways to remove extra spaces: manually (if the text is small), and automatically. I prefer to do things quickly. Actually, for this, the developers of the Word text editor are trying to make everything fast and convenient.

Another thing is that often their efforts are in vain, due to the fact that people simply have no time to study reference manuals. And it makes no sense to study something that you may never need. But if you are reading this article, then you really need it.

Then let's get started.

How to automatically remove extra spacesin Word

Open the document that we need to edit.

Go to the menu home at the very end (on the right). There is a block called Editing. Mouse click on the link Replace.

A small window will open Find and Replace. Go to tab Replace.

Press the button below More.

Check the box next to the entry Wildcards. There should be no more checkboxes anywhere. We set the direction Everywhere.

If we need to set one space in the entire text, then in the line Find put the cursor and press the key on the keyboard Space. After that we write {2;}

This figure indicates that if there are two or more spaces in the text, then they must be removed.

In line Replaced by, again put the cursor and press the key on the keyboard Space.

Now press the key Replace All. After the work done, a window with a report will appear.

When typing or in the file you downloaded in Word, you may notice that the spaces between words are large. Don't worry, this is normal and completely fixable. In our article, we will try to figure out why this happens and how to remove large spaces in Word.

Justify

If you figure out how to remove large spaces in Word, then the first thing you need to talk about is the problem with alignment. After all, it is the most common one. Although its essence lies in the little things, and users make mistakes simply by negligence. But first things first. Let's figure out how to remove large spaces between words in "Word" if the problem is alignment in width.

There are two solutions. Let's start with the one that turns out to be the simplest. Try changing the alignment - instead of the "justify" option, select "left aligned". Of course, it is allowed that this method won't work. After all, often the problem lies in the formatting of the file. Or it may be that this alignment does not suit you. Then use the second method.

The second way is already in the fact that we will use hot keys: CTRL + SHIFT + SPACEBAR. Who does not know, the combination of these keys gives the same short space. All you need to do is replace large spaces with short ones.

Problem with non-printable "end of line" character

We have already figured out how to remove large spaces in the "Word" if the reason for this was incorrect alignment. But although this problem the most common, it is not the only one. Now we will analyze the situation when the "hero of the occasion" is a non-printable "end of line" character.

We won’t talk about what a non-printable sign is and why it is needed in the Word, it’s better to get down to business right away. First of all, you will need to enable the display of these very characters. This is done by clicking on the appropriate button, which is located on the top panel, on the Home tab. However, you can observe its location in the proposed image.

By clicking on this button, you will see all non-printable characters, including the "end of line". It is this symbol that makes us dirty. It looks like a curved arrow, looking to the left. All you have to do is remove it. After that, spaces are normalized.

So you learned how to remove large spaces in Word when the problem lies in the non-printable "end of line" character. By the way, this sign is placed when you press the SHIFT + ENTER key combination, so be careful not to accidentally put it.

Tabulation problem

Large spaces can also be caused by tabs. What it is, we also will not disassemble. I just want to say right away that this character is again non-printable, and it is put when you press the TAB key.

You could already guess that since this sign is non-printable, then its removal occurs, as in the previous example, through the display of non-printable characters. That's the way it is. Turn on the display and find in the text short arrows pointing to the right. This is tabulation. Like last time, you need to change all these arrows to spaces, and the text will become normal view- large gaps will disappear.

Replacing large spaces with short ones

So, we have learned the last, third way, how to remove large spaces in the Word text. But what if there are an unimaginable number of tabs throughout the text. Agree, few people want to remove them one by one on their own. That is why we will now present a method that will help to change all these characters in an instant to the short spaces we need.

Probably everyone has heard of "Replacement" in "Word". This is the function we will use. First, copy one tab character to the clipboard (CTRL+C). After that run "Find and Replace" (CTRL+H). There will be two fields: "Find" and "Replace". In the first place the copied tab character, and in the second put a space. Click the "Replace All" button and all large spaces will be replaced with short ones.

If, due to the specifics of your work, you often receive Word documents prepared by someone else, then you probably met in texts in addition to spelling mistakes, problems of a different kind - extra spaces between words or before punctuation marks. Deleting them manually is tedious and time consuming.

But you can make your life much easier if you create two macros that, on their own and in the blink of an eye, will save the document from this misfortune.

Macros are not original and are based on the advice of the authors of the book " Microsoft Word: Comfortable working with macros".

To get started, open some document that you intend to check, or create one yourself by deliberately adding extra spaces between words and before punctuation marks in the text. First, we will create a macro that will remove extra spaces between words.

For those readers who know how to work with the editor built into Microsoft Word Visual Basic I'll just bring finished code macro:

Sub DeleteSpace() Selection.WholeStory Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = " (2;)" .Replacement.Text = " " .Forward = True .Wrap = wdFindAsk .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchWildcards = True End With Selection.Find.Execute Replace:=wdReplaceAll Selection.MoveRight Unit:=wdCharacter, Count:=1 End Sub

The second macro we created will find and remove all extra spaces before punctuation marks. Repeat steps 1 through 6 inclusive. Name the macro as DeleteSpacePunctuationMark.

Next steps:

  1. Enter in the field Find first a space, and then enter the following expression:

    {1;}([.,:;\!\?])

    This expression literally means that one or more consecutive spaces that precede any punctuation character listed in square brackets will be searched.

  2. Go to the field Replaced by and type \1 (here unit means serial number expression enclosed in parentheses).
  3. Click the button Replace All.
  4. Close the dialog box when you have finished searching and replacing. Find and Replace. Deselect text by pressing the arrow key on your keyboard.
  5. Click on the square button in the control panel to stop recording.

For VB connoisseurs - the code to insert into the VisualBasic editor:

Sub DelSpacePunktMark() Selection.WholeStory Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = " (1;)([.,:;\!\?])" .Replacement.Text = " \1" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute Replace:=wdReplaceAll Selection.MoveLeft Unit :=wdCharacter, Count:=1 End Sub

So you get rid of the routine of manual actions, which, alas, are inevitable when editing any Word documents, especially when looking for extra spaces in the text.

Extra spaces are not only a very disturbing sign in documents, but also a sign of the inexperience of the person typing. Each odd space- this is an additional negative factor for a sloppy design word document. It is enough to change the indentation of the fields or the indentation of the red line so that the seemingly ready text “disperses” into different sides. This can be avoided if you do not enter extra spaces at the typing stage. How to avoid it? Read the first chapter of the ten commandments of the Word - Do not insert extra spaces. But most often, sloppy text is not created from scratch, but is found on the Internet, for example, in the form of abstracts, diplomas, etc. What to do? Remove each space manually? No need - Word allows you not only to enter unnecessary, but also to quickly delete it.

How to remove spaces at the beginning and end of a string

Most often, extra spaces at the beginning of a line replace the indentation of the red line (the first line in a paragraph) for inexperienced users. Instead of spaces in such cases, use the menu Format | Paragraph…, on the Indents & Spacing tab, in the Indent | First line" select "Indent" and set the standard value - 1.27 cm.

To quickly clear everything extra spaces and tabs at the beginning and end of lines, select all the text, set the alignment to the center - the spaces will be removed. After that, set the desired alignment, for example, in width.

Be careful not to knock off the different alignment for different parts text - for example, right-aligned for epigraphs, centered for headings. In such cases, it is better to replace the space and the paragraph mark with a paragraph mark. Select menu Edit | Replace… In the "Find" field, enter a space (press the space). Click the "More" button to expand the dialog. Click the "Special" button and the menu that appears select paragraph mark. The text "^p" will be added to the "Find" field. In the "Replace with" field, insert a single paragraph mark "^p". Click the "Replace All" button. Click again - there may have been triple spaces in the text before the paragraphs.

How to remove extra spaces in text

Extra spaces are put mainly due to the fact that they do not know about non-breaking space, and try to add a lot of spaces so that the letter "g." not separated from the year or city name. By the way, to enter a non-breaking space, use Ctrl+Shift+Space- press and hold ctrl, Shift, press the spacebar and release all keys. Almost the same is set non-breaking hyphen in combinations like "1st", "A-1" - Ctrl+Shift+Hyphen.

To take everything away extra spaces throughout the text, select menu Edit | Replace… In the "Find" field, enter two spaces (double-click on the space). Be careful - you may have already entered a space in the field earlier. In the "Replace with" field, enter a single space. Click the "Replace All" button. Click again - there may have been triple spaces in the text.

If the situation is absolutely terrible and there are very, very many spaces in the text, first replace five spaces in a row with one space. After getting rid of them, replace double spaces with a single space.

To view invisible characters turn on their display - click the "Non-printing characters" button on the toolbar. Then spaces are displayed with dots ".", tabulation with an arrow "→", a non-breaking space with a circle "°", a paragraph mark "¶", a line break "", a soft hyphen "¬", a non-breaking hyphen as an em dash "-".

Extra spaces in documents created in the Word text editor are quite common. Especially novice computer users “sin” with them, who try to align texts by setting numerous spaces, which ultimately results in difficulties with subsequent editing. text documents. You can also find large spaces between words and in documents experienced users. Here they arise most often due to the peculiarities of aligning texts to the width of the document. In this article, we will talk about how to fix the situation in both cases.

You can see all whitespace issues in your document by turning on display mode hidden characters formatting using this button in the main menu of the text editor.


In a well-formed document, in which there is only one space between words, there should be only one period between these same words. If there are more dots, then the document contains extra spaces that it is desirable to remove. In the example below, all extra spaces are marked with red squares.


How to remove extra spaces in Word
The solutions offered on the Internet recommend using the search for double spaces and replacing them with single ones. But what if not only double spaces are used, but also triple or containing four, five or more spaces in a row? You can, of course, auto-correct five spaces first with a single one, then four, then replace the triples and get to the doubles, but there is a more elegant solution. It is also necessary to use search and replace, but use a macro substitution in the form regular expression. It sounds complicated and incomprehensible, but it is implemented quite simply as follows:
You can also use wildcard expressions to find and replace other characters in your document by replacing a space with the appropriate character.

How to remove extra characters in Word when justifying text
The problem with large justified spaces occurs when the length of the words contained in a line does not allow for the intended text alignment otherwise than by setting large spaces between words. Most often this happens in subheadings, when there are few words in the lines, and the text editor cannot perform automatic word wrapping. To help in this case, you can enforce the use of non-breaking spaces.

This is done as follows.
The examples discussed above were shown using the Word 2007 text editor as an example. In other versions of this program, namely Word 2003, Word 2010, Word 2013 and Word 2016, everything is done in the same way.