"Find" finds text but "Replace" doesn't

E

Eric

Why would this happen?

I'm using Word 2003. The document contains revisions, and I'm in Final view,
so the revisions are not visible.

Why would Find find text but Replace doesn't? Shouldn't Find an Replace work
exactly the same way?

Thanks.
 
G

grammatim

Did you type something into the Replace box?

Why do you mention the Track Changes? Find won't find Changes when the
Changes aren't visible.
 
E

Eric

Yes, I typed the same thing into the Replace box that I typed into the Find
box.

I mentioned Track Changes only in an attempt to mention anything which might
be relevant. This *shouldn't* be relevant, but perhaps is. My target text
*is* visible.

The weird thing is that Find finds it, but Replace does not. It's the same
target text, no special search options or formatting in the Find or Replace.
For both Find and Replace, I type it into the Find or Replace box. Yet Find
finds it, and Replace doesn't. I can't figure out why.
 
G

Graham Mayor

Do we have to guess what the find string is that you cannot find?

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
E

Eric

One space -- though that's irrelevant to the question I'm asking. The trouble
is that Replace does not find the target text, which is two spaces.
 
B

Bob Buckland ?:-\)

Hi Eric,

It becomes relevant when folks are attempting to duplicate the behavior with the same conditions and steps. :)

In creating a document in Word 2003 that had two spaces already in some places in it and adding two spaces by typing in other cases,
then putting the Review toolbar into final display mode for me Replace handled all of the 2-spaces to 1-space changes.

Was the text typed in or pasted from the web or another document, or ??? Is there a specific font used or style formatting applied?

============
One space -- though that's irrelevant to the question I'm asking. The trouble
is that Replace does not find the target text, which is two spaces. <<
--

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*
 
E

Eric

Yes, that's what I did. Nothing unusual, just the straightforward Find, which
worked, and then a straightforward Replace, which didn't work.

I used Find (control-F, or Edit/Find) with
Find what:<space><space>

It found many instances of two spaces.

I then used Replace (control-H, or Edit/Replace) with:
Find what:<space><space>
Replace:<space>

Replace could not find the double-spaces that Find had just found.
 
E

Eric

I've figured out Word is doing. It still seems incorrect to me, but at least
I now see what's happening.

Using an example:

In the text I have "abc" (i.e., the letters a,b,c). I turn on Track Changes
and delete the b. In Final Showing Markup view I see abc, with b
struck-through. I do a Find, with Find What: ac, and Find does not find the
target, which is what I expect. Also, Replace fails to find the target.

I then change to Final view. Now Find finds the ac, and Replace doesn't.

This seems incorrect to me. In my opinion, Find and Replace should work
exactly the same in what they find or don't find. (Obviously, Replace also
has the capability of replacing the target text, once found.) But they don't.

I've learned something.
 
S

Suzanne S. Barnhill

I agree that this is bug-like. But it sounds to me as if you're getting
extra spaces when you delete text that you would not get if you were using
some "smart" feature or other. Both on the Edit tab of Tools | Options and
in the "Smart cut andpaste" settings, there are some settings that might
result in those extra spaces being deleted. This "smart" behavior still not
infallible (I have issues about the way it behaves around parentheses), but
it does help.
 
E

Eric

That may be true, and thanks for the reminder. But to me the problem is
independent of this.

I have always assumed that Find and Replace work exactly the same, as to
what they find and don't find. But I've now discovered that they work
differently: in this case, Find finds something, and Replace doesn't,
although I'm putting identical target text in the Find What box.

If Find finds a target and Replace doesn't, to me that's a problem in itself.
 
E

Eric

As always, thanks for your help.


Suzanne S. Barnhill said:
I agree that this is anomalous, and I said I thought it was bug-like.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
 
S

Suzanne S. Barnhill

Just a couple of points here:

1. Searching for a space will actually find nonbreaking spaces as well as
ordinary ones.

2. Eric *is* searching in Final view; that's the issue. The spaces he's
looking for are separated by deleted text. This doesn't seem to prevent Word
from finding the two spaces as long as he's only looking, but it does
prevent replacement.

The more I think about this, the more logical it is, really. In order to
replace the two spaces with one, Word would have to make some decision about
the deleted text that separates them, and the logical result would be to
delete it, but until that change is accepted, it can't actually be finally
deleted. I think that's the issue here.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

PamC via OfficeKB.com said:
OK. In the Find and Replace dialog, Click the more button. Make sure
all
the check boxes (Match case, etc.) are clear; that the box after Search
in:
says document; and the one after Search: says all. Also make sure
there's
no formatting such as bold, under the find what box.

These descriptions may be a bit off. I don't have W2003 loaded, and W2007
is
a little bit different (for example, it does not have Search in).

Many people say that the Word's find function gets hung up and won't find
things that are clearly there. They solve this by shutting down Word and
starting it again. I'm not sure that this has ever happened to me. I
find
that I've usually forgotten to clear the boxes and formatting or that Word
has moved into a part of the document that has no result (headers and text
boxes--is that right, experts?). Of course, restarting Word does clear
the
boxes and formatting and such. Just takes a little longer.

A couple more things.
-Check to make sure that all of your spaces *are* spaces (and not
nonbreaking spaces--those little circles that show up when show hidden
characters is on).

-Run the find & replace in final view, not final showing markup.

Hope this helps,
PamC


Yes, that's what I did. Nothing unusual, just the straightforward Find,
which
worked, and then a straightforward Replace, which didn't work.

I used Find (control-F, or Edit/Find) with
Find what:<space><space>

It found many instances of two spaces.

I then used Replace (control-H, or Edit/Replace) with:
Find what:<space><space>
Replace:<space>

Replace could not find the double-spaces that Find had just found.
Replace doesn't *find* anything. It holds the text that will be inserted
in
place whatever Find has found. So in your case I'm guessing you want
[quoted text clipped - 15 lines]
And what are you replacing it with?
 
G

grammatim

I don't understand why Eric keeps saying that "Replace" doesn't find
things. It isn't :"Replace"'s job to find things; it's Replace's job
to Replace them after they're found.

And of course a sequence of two spaces doesn't exist until the marked-
for-deletion material between them is actually deleted!

But you're right about "Smart Find" -- Track Changes, for me, always
includes the following space when I make a change to a word. I have
Smart Find always turned on, but not the one that keeps you from
selecting less than a whole word.

Just a couple of points here:

1. Searching for a space will actually find nonbreaking spaces as well as
ordinary ones.

2. Eric *is* searching in Final view; that's the issue. The spaces he's
looking for are separated by deleted text. This doesn't seem to prevent Word
from finding the two spaces as long as he's only looking, but it does
prevent replacement.

The more I think about this, the more logical it is, really. In order to
replace the two spaces with one, Word would have to make some decision about
the deleted text that separates them, and the logical result would be to
delete it, but until that change is accepted, it can't actually be finally
deleted. I think that's the issue here.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA



OK.  In the Find and Replace dialog, Click the more button.  Make sure
all
the check boxes (Match case, etc.) are clear; that the box after Search
in:
says  document; and  the one after Search: says all.  Also make sure
there's
no formatting such as bold,  under the find what box.
These descriptions may be a bit off. I don't have W2003 loaded, and  W2007
is
a little bit different (for example, it does not have Search in).
Many people say that the Word's find function gets hung up and won't find
things that are clearly there. They solve this by shutting down Word and
starting it again.  I'm not sure that this has ever happened to me.  I
find
that I've usually forgotten to clear the boxes and formatting or that Word
has moved into a part of the document that has no result (headers and text
boxes--is that right, experts?).  Of course, restarting Word does  clear
the
boxes and formatting and  such.  Just takes a little longer.
A couple more things.
-Check to make sure that all of your spaces *are*  spaces (and not
nonbreaking spaces--those little circles that show up  when show hidden
characters is on).
-Run the find & replace in final view, not final showing markup.
Hope this helps,
PamC
Eric said:
Yes, that's what I did. Nothing unusual, just the straightforward Find,
which
worked, and then a straightforward Replace, which didn't work.
I used Find (control-F, or Edit/Find) with
Find what:<space><space>
It found many instances of two spaces.
I then used Replace (control-H, or Edit/Replace) with:
Find what:<space><space>
Replace:<space>
Replace could not find the double-spaces that Find had just found.
Replace doesn't *find* anything. It holds the text that will be inserted
in
place whatever Find has found.  So in your case I'm guessing you want
[quoted text clipped - 15 lines]
And what are you replacing it with?
 
S

Suzanne S. Barnhill

I use wildcards so rarely (and so ineptly) that I wasn't aware that spaces
are treated differently. Thanks for enlightening me.

As for the replacement, Bob Buckland performed a number of diagnostic tests
with results too complex to even read about, much less report, but I think
we can all agree that Word's behavior is not illogical even though it is
(initially) puzzling.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

PamC via OfficeKB.com said:
Suzanne, I agree with you completely about your point 2. I was so caught
up
in his saying the replace couldn't "find" the spaces that I didn't
interpret it as meaning that it didn't replace the two spaces--which, as
you
say, is perfectly understandable when there are deletions between the
spaces.


And you are right about point 1 too, except if you are searching using
wild
cards, which is what I most often do. In fact I rely on Word not finding
my
combinations of NB space and regular space when I run my multiple space
removing macro. Word is such a tricky program.

Thanks for setting me straight.

PamC
Just a couple of points here:

1. Searching for a space will actually find nonbreaking spaces as well as
ordinary ones.

2. Eric *is* searching in Final view; that's the issue. The spaces he's
looking for are separated by deleted text. This doesn't seem to prevent
Word
from finding the two spaces as long as he's only looking, but it does
prevent replacement.

The more I think about this, the more logical it is, really. In order to
replace the two spaces with one, Word would have to make some decision
about
the deleted text that separates them, and the logical result would be to
delete it, but until that change is accepted, it can't actually be finally
deleted. I think that's the issue here.
OK. In the Find and Replace dialog, Click the more button. Make sure
all
[quoted text clipped - 49 lines]
And what are you replacing it with?
 
D

Duane

OK, I have the same problem in 2007.

I'm searching for ^p^t (paragraph character followed by tab character).
On the "Find" tab, it finds them all. Go to the "Replace" tab, click the
"Find next" button, and it finds none.

I'm not using (never use) Track Changes, and all the criteria and options
are identical. I've closed and re-opened the document.

Any ideas?
Thanks,
Duane
 

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