Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find & Replace Question
I have a bunch of documents that I am trying to do a find and replace on. The
problem is that they have words with various spaces after them and I want to deleted the spaces and put in an underline. Examples are like the following: Torque (with 5 spaces) Torque (with 8 spaces) And I want it to look like this Torque _________ Is there a wildcard that will find the spaces? |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find & Replace Question
Use the code ^w to find any number of consecutive spaces and tabs. (This
is also available by clicking More and then Special, and choosing "White Space".) So in the Find What box enter Torque^w and in the Replace With box enter Torque _________ -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Fuzzhead wrote: I have a bunch of documents that I am trying to do a find and replace on. The problem is that they have words with various spaces after them and I want to deleted the spaces and put in an underline. Examples are like the following: Torque (with 5 spaces) Torque (with 8 spaces) And I want it to look like this Torque _________ Is there a wildcard that will find the spaces? |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find & Replace Question
Thanks Jay, that worked when I ran it.
One thing I didn't realize on some of the words is that they are not all the same. See the follow: Wrench ID (with spacing) Wrench ID#(with spacing) Wrench ID#with spacing) and so on...... As you can see its in there many different ways. How do I capture all the variuos ways its in there so I can run the Find & Replace only once? "Jay Freedman" wrote: Use the code ^w to find any number of consecutive spaces and tabs. (This is also available by clicking More and then Special, and choosing "White Space".) So in the Find What box enter Torque^w and in the Replace With box enter Torque _________ -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Fuzzhead wrote: I have a bunch of documents that I am trying to do a find and replace on. The problem is that they have words with various spaces after them and I want to deleted the spaces and put in an underline. Examples are like the following: Torque (with 5 spaces) Torque (with 8 spaces) And I want it to look like this Torque _________ Is there a wildcard that will find the spaces? |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find & Replace Question
For that you need a real "wildcard" search, as described at
http://www.gmayor.com/replace_using_wildcards.htm. (The ^w code isn't considered a wildcard in a Word search.) To make that work, first click the More button and check the box for "Use wildcards". You'll have to do this in two passes, because Word's wildcards can express "one or more of this character" but they can't say "zero or more of this character". The first pass is a wildcard search for Find what: [#:b][b]{1,} Replace with: b_______ (where I used the letter b to represent a blank). Then you'll have to follow that with a non-wildcard search for Find what: #b_ Replace with: b_ -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Fuzzhead wrote: Thanks Jay, that worked when I ran it. One thing I didn't realize on some of the words is that they are not all the same. See the follow: Wrench ID (with spacing) Wrench ID#(with spacing) Wrench ID#with spacing) and so on...... As you can see its in there many different ways. How do I capture all the variuos ways its in there so I can run the Find & Replace only once? "Jay Freedman" wrote: Use the code ^w to find any number of consecutive spaces and tabs. (This is also available by clicking More and then Special, and choosing "White Space".) So in the Find What box enter Torque^w and in the Replace With box enter Torque _________ -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Fuzzhead wrote: I have a bunch of documents that I am trying to do a find and replace on. The problem is that they have words with various spaces after them and I want to deleted the spaces and put in an underline. Examples are like the following: Torque (with 5 spaces) Torque (with 8 spaces) And I want it to look like this Torque _________ Is there a wildcard that will find the spaces? |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find & Replace Question
Thanks that did the job.
"Jay Freedman" wrote: For that you need a real "wildcard" search, as described at http://www.gmayor.com/replace_using_wildcards.htm. (The ^w code isn't considered a wildcard in a Word search.) To make that work, first click the More button and check the box for "Use wildcards". You'll have to do this in two passes, because Word's wildcards can express "one or more of this character" but they can't say "zero or more of this character". The first pass is a wildcard search for Find what: [#:b][b]{1,} Replace with: b_______ (where I used the letter b to represent a blank). Then you'll have to follow that with a non-wildcard search for Find what: #b_ Replace with: b_ -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Fuzzhead wrote: Thanks Jay, that worked when I ran it. One thing I didn't realize on some of the words is that they are not all the same. See the follow: Wrench ID (with spacing) Wrench ID#(with spacing) Wrench ID#with spacing) and so on...... As you can see its in there many different ways. How do I capture all the variuos ways its in there so I can run the Find & Replace only once? "Jay Freedman" wrote: Use the code ^w to find any number of consecutive spaces and tabs. (This is also available by clicking More and then Special, and choosing "White Space".) So in the Find What box enter Torque^w and in the Replace With box enter Torque _________ -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Fuzzhead wrote: I have a bunch of documents that I am trying to do a find and replace on. The problem is that they have words with various spaces after them and I want to deleted the spaces and put in an underline. Examples are like the following: Torque (with 5 spaces) Torque (with 8 spaces) And I want it to look like this Torque _________ Is there a wildcard that will find the spaces? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find & Replace (replace w/ field)? | Microsoft Word Help | |||
Mega macro with find and replace (HELP!) | Microsoft Word Help | |||
Find and Replace GREEK symbols in XP, 2K & 97 | Microsoft Word Help | |||
Find & Replace does not find formatting | Microsoft Word Help | |||
Find and Replace Locks Up Word | Formatting Long Documents |