Remove double spaces between words in a document

  • Thread starter www.thewordsmith.biz
  • Start date
W

www.thewordsmith.biz

Word 2003.

When editing long documents, such as a book manuscript, I need to search
globally for double spaces between words, and replace them automatically with
single spaces.

How do I do that?
 
G

Graham Mayor

Search for
([ ]){2,}
with the wildcard option set
replace with
\1

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
H

Herb Tyson [MVP]

Ctrl+H.

Find what:<space><space>

Replace with:<space>

Replace all.

Note: <space> indicates that you should press the Space bar.

This presumes that two consecutive spaces are NEVER wanted. For documents I
edit, this is always the case. I routinely do this find/replace when I open
documents I'm asked to edit. (If a client wants two spaces after sentence
terminators, I talk them out of it. When using proportional spacing, a
single space is the industry standard.)

It is possible to design a search to remove spaces only between words,
though.

With Use wildcards enabled:

Find what:([A-Z,a-z])( )([A-Z,a-z])

Replace with:\1 \3

Note that there are two spaces in the ( ) in Find what, and one space
between \1 and \3 in the Replace with.
 
P

Peter T. Daniels

Note that some here have said that finding <space><space> will also
find <space>Inline graphic<space>, so you'd lose your pictures, if you
had any.

Ctrl+H.

Find what:<space><space>

Replace with:<space>

Replace all.

Note: <space> indicates that you should press the Space bar.

This presumes that two consecutive spaces are NEVER wanted. For documentsI
edit, this is always the case. I routinely do this find/replace when I open
documents I'm asked to edit. (If a client wants two spaces after sentence
terminators, I talk them out of it. When using proportional spacing, a
single space is the industry standard.)

It is possible to design a search to remove spaces only between words,
though.

With Use wildcards enabled:

Find what:([A-Z,a-z])(  )([A-Z,a-z])

Replace with:\1 \3

Note that there are two spaces in the (  ) in Find what, and one space
between \1 and \3 in the Replace with.

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog:http://word2007bible.herbtyson.com
Web:http://www.herbtyson.com

"www.thewordsmith.biz" <[email protected]>
wrote in message

Word 2003.
When editing long documents, such as a book manuscript, I need to search
globally for double spaces between words, and replace them automatically
with
single spaces.
How do I do that?-
 
D

DeanH

Hello Peter, I saw this comment once somewhere before ages ago, tested it
then, did not get the result that is described. Just tested again,
<space><space> and it did not find the <space>InlineGraphic<space> that I had
set up for the test.
I am constantly using <space><space> for this exercise for the document I
receive and have never come across this affect.
Wonder where this came from?
All the best
DeanH


Peter T. Daniels said:
Note that some here have said that finding <space><space> will also
find <space>Inline graphic<space>, so you'd lose your pictures, if you
had any.

Ctrl+H.

Find what:<space><space>

Replace with:<space>

Replace all.

Note: <space> indicates that you should press the Space bar.

This presumes that two consecutive spaces are NEVER wanted. For documents I
edit, this is always the case. I routinely do this find/replace when I open
documents I'm asked to edit. (If a client wants two spaces after sentence
terminators, I talk them out of it. When using proportional spacing, a
single space is the industry standard.)

It is possible to design a search to remove spaces only between words,
though.

With Use wildcards enabled:

Find what:([A-Z,a-z])( )([A-Z,a-z])

Replace with:\1 \3

Note that there are two spaces in the ( ) in Find what, and one space
between \1 and \3 in the Replace with.

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog:http://word2007bible.herbtyson.com
Web:http://www.herbtyson.com

"www.thewordsmith.biz" <[email protected]>
wrote in message

Word 2003.
When editing long documents, such as a book manuscript, I need to search
globally for double spaces between words, and replace them automatically
with
single spaces.
How do I do that?-
 
P

Peter T. Daniels

Maybe it was a feature introduced with Word2007?

Hello Peter, I saw this comment once somewhere before ages ago, tested it
then, did not get the result that is described. Just tested again,
<space><space> and it did not find the <space>InlineGraphic<space> that Ihad
set up for the test.
I am constantly using <space><space> for this exercise for the document I
receive and have never come across this affect.
Wonder where this came from?
All the best
DeanH



Peter T. Daniels said:
Note that some here have said that finding <space><space> will also
find <space>Inline graphic<space>, so you'd lose your pictures, if you
had any.
Ctrl+H.
Find what:<space><space>
Replace with:<space>
Replace all.
Note: <space> indicates that you should press the Space bar.
This presumes that two consecutive spaces are NEVER wanted. For documents I
edit, this is always the case. I routinely do this find/replace when I open
documents I'm asked to edit. (If a client wants two spaces after sentence
terminators, I talk them out of it. When using proportional spacing, a
single space is the industry standard.)
It is possible to design a search to remove spaces only between words,
though.
With Use wildcards enabled:
Find what:([A-Z,a-z])(  )([A-Z,a-z])
Replace with:\1 \3
Note that there are two spaces in the (  ) in Find what, and one space
between \1 and \3 in the Replace with.
--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog:http://word2007bible.herbtyson.com
Web:http://www.herbtyson.com
"www.thewordsmith.biz" <[email protected]>
wrote in message
Word 2003.
When editing long documents, such as a book manuscript, I need to search
globally for double spaces between words, and replace them automatically
with
single spaces.
How do I do that?--
 
D

DeanH

Oh no.
Not another feature messed up in 2007! ;-)
And another on hopefully corrected in 2010 (2007sp3?).
I will test this at home on my 2007 there.
All the best
DeanH


Peter T. Daniels said:
Maybe it was a feature introduced with Word2007?

Hello Peter, I saw this comment once somewhere before ages ago, tested it
then, did not get the result that is described. Just tested again,
<space><space> and it did not find the <space>InlineGraphic<space> that I had
set up for the test.
I am constantly using <space><space> for this exercise for the document I
receive and have never come across this affect.
Wonder where this came from?
All the best
DeanH



Peter T. Daniels said:
Note that some here have said that finding <space><space> will also
find <space>Inline graphic<space>, so you'd lose your pictures, if you
had any.
Find what:<space><space>
Replace with:<space>
Replace all.
Note: <space> indicates that you should press the Space bar.
This presumes that two consecutive spaces are NEVER wanted. For documents I
edit, this is always the case. I routinely do this find/replace when I open
documents I'm asked to edit. (If a client wants two spaces after sentence
terminators, I talk them out of it. When using proportional spacing, a
single space is the industry standard.)
It is possible to design a search to remove spaces only between words,
though.
With Use wildcards enabled:
Find what:([A-Z,a-z])( )([A-Z,a-z])
Replace with:\1 \3
Note that there are two spaces in the ( ) in Find what, and one space
between \1 and \3 in the Replace with.
--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog:http://word2007bible.herbtyson.com
Web:http://www.herbtyson.com
Word 2003.
When editing long documents, such as a book manuscript, I need to search
globally for double spaces between words, and replace them automatically
with
single spaces.
How do I do that?--
 
S

Suzanne S. Barnhill

As Peter says, this is a bug that affects Word 2007 only. Like you, I use
this replace operation all the time, and it's just one of many reasons I'm
still doing production work in Word 2003.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

DeanH said:
Hello Peter, I saw this comment once somewhere before ages ago, tested it
then, did not get the result that is described. Just tested again,
<space><space> and it did not find the <space>InlineGraphic<space> that I
had
set up for the test.
I am constantly using <space><space> for this exercise for the document I
receive and have never come across this affect.
Wonder where this came from?
All the best
DeanH


Peter T. Daniels said:
Note that some here have said that finding <space><space> will also
find <space>Inline graphic<space>, so you'd lose your pictures, if you
had any.

Ctrl+H.

Find what:<space><space>

Replace with:<space>

Replace all.

Note: <space> indicates that you should press the Space bar.

This presumes that two consecutive spaces are NEVER wanted. For
documents I
edit, this is always the case. I routinely do this find/replace when I
open
documents I'm asked to edit. (If a client wants two spaces after
sentence
terminators, I talk them out of it. When using proportional spacing, a
single space is the industry standard.)

It is possible to design a search to remove spaces only between words,
though.

With Use wildcards enabled:

Find what:([A-Z,a-z])( )([A-Z,a-z])

Replace with:\1 \3

Note that there are two spaces in the ( ) in Find what, and one space
between \1 and \3 in the Replace with.

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog:http://word2007bible.herbtyson.com
Web:http://www.herbtyson.com

"www.thewordsmith.biz" <[email protected]>
wrote in
message


Word 2003.

When editing long documents, such as a book manuscript, I need to
search
globally for double spaces between words, and replace them
automatically
with
single spaces.

How do I do that?-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top