Wildcard search... buggy?

A

avcarrie

I have some strange search problems.

Sometimes if I do a wildcard search for text (that I know exists) that
includes ^013 (paragraph marker), Word does not tell me that no results were
found, yet no result is selected. To try and find the selection/cursor, I
hold shift and press an arrow key to extend whatever resulting selection
there might be in my doc. If I tried to extend right/down, all text from the
search result (inclusive) to end of doc is selected. If I tried up/left
there is no selection, and the cursor is at start of doc.

e.g., searching for (this pattern exists in doc):

Plan Completion Date:^t[!^013]@^013

causes this behaviour but (if I add any gibberish after the final ^013)...

Plan Completion Date:^t[!^013]@^013sdfsdfsdfsdfsdfsdf

causes the same behaviour although the given pattern does not exist in my doc.

Has anyone come across such behaviour or am I alone here? My macros become
quite useless if I can't rely on simple search/replace. Note that I have all
text / formatting / field codes visible.
 
G

Graham Mayor

What is the line of text that you think you are looking for with this search
pattern?

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
A

avcarrie

The complete line is (where the whitespace after the colon is a tab):
Plan Completion Date: June 2006


Graham Mayor said:
What is the line of text that you think you are looking for with this search
pattern?

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
I have some strange search problems.

Sometimes if I do a wildcard search for text (that I know exists) that
includes ^013 (paragraph marker), Word does not tell me that no
results were found, yet no result is selected. To try and find the
selection/cursor, I hold shift and press an arrow key to extend
whatever resulting selection there might be in my doc. If I tried to
extend right/down, all text from the search result (inclusive) to end
of doc is selected. If I tried up/left there is no selection, and
the cursor is at start of doc.

e.g., searching for (this pattern exists in doc):

Plan Completion Date:^t[!^013]@^013

causes this behaviour but (if I add any gibberish after the final
^013)...

Plan Completion Date:^t[!^013]@^013sdfsdfsdfsdfsdfsdf

causes the same behaviour although the given pattern does not exist
in my doc.

Has anyone come across such behaviour or am I alone here? My macros
become quite useless if I can't rely on simple search/replace. Note
that I have all text / formatting / field codes visible.
 
G

Graham Mayor

I cannot reproduce the problem using your examples. May I suggest that you
try renaming the settings sub key of the Word data key in the registry -
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Data and clear temp
files - http://www.gmayor.com/what_to_do_when_word_crashes.htm and then
repair Word from the Word Help menu.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


The complete line is (where the whitespace after the colon is a tab):
Plan Completion Date: June 2006


Graham Mayor said:
What is the line of text that you think you are looking for with
this search pattern?

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
I have some strange search problems.

Sometimes if I do a wildcard search for text (that I know exists)
that includes ^013 (paragraph marker), Word does not tell me that no
results were found, yet no result is selected. To try and find the
selection/cursor, I hold shift and press an arrow key to extend
whatever resulting selection there might be in my doc. If I tried
to extend right/down, all text from the search result (inclusive)
to end of doc is selected. If I tried up/left there is no
selection, and the cursor is at start of doc.

e.g., searching for (this pattern exists in doc):

Plan Completion Date:^t[!^013]@^013

causes this behaviour but (if I add any gibberish after the final
^013)...

Plan Completion Date:^t[!^013]@^013sdfsdfsdfsdfsdfsdf

causes the same behaviour although the given pattern does not exist
in my doc.

Has anyone come across such behaviour or am I alone here? My macros
become quite useless if I can't rely on simple search/replace. Note
that I have all text / formatting / field codes visible.
 
A

avcarrie

Thanks for the suggestions Graham, but it turns out the cause lies elsewhere.
Changes were being tracked in my document, and the line I gave:

Plan Completion Date: June 2006

had changes associated with it ("June" had at one time been changed from
"March"), so "June" was underlined etc. So apparently, whether the tracking
markup is visible or not, change tracking seems to affect wildcard searching.
That's bad news.

Since my search is part of a macro, I suppose I could accept all changes,
run search, store location of result range, and undo the accept. But that
just seems expensive.

Any thoughts?


Graham Mayor said:
I cannot reproduce the problem using your examples. May I suggest that you
try renaming the settings sub key of the Word data key in the registry -
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Data and clear temp
files - http://www.gmayor.com/what_to_do_when_word_crashes.htm and then
repair Word from the Word Help menu.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


The complete line is (where the whitespace after the colon is a tab):
Plan Completion Date: June 2006


Graham Mayor said:
What is the line of text that you think you are looking for with
this search pattern?

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

avcarrie wrote:
I have some strange search problems.

Sometimes if I do a wildcard search for text (that I know exists)
that includes ^013 (paragraph marker), Word does not tell me that no
results were found, yet no result is selected. To try and find the
selection/cursor, I hold shift and press an arrow key to extend
whatever resulting selection there might be in my doc. If I tried
to extend right/down, all text from the search result (inclusive)
to end of doc is selected. If I tried up/left there is no
selection, and the cursor is at start of doc.

e.g., searching for (this pattern exists in doc):

Plan Completion Date:^t[!^013]@^013

causes this behaviour but (if I add any gibberish after the final
^013)...

Plan Completion Date:^t[!^013]@^013sdfsdfsdfsdfsdfsdf

causes the same behaviour although the given pattern does not exist
in my doc.

Has anyone come across such behaviour or am I alone here? My macros
become quite useless if I can't rely on simple search/replace. Note
that I have all text / formatting / field codes visible.
 
G

Graham Mayor

Try
Plan Completion Date:^t*^013
This seems to work regardless of the tracked changes provided the line still
ends with a paragraph mark..... but I don't have your document to try it on
:)

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Thanks for the suggestions Graham, but it turns out the cause lies
elsewhere. Changes were being tracked in my document, and the line I
gave:

Plan Completion Date: June 2006

had changes associated with it ("June" had at one time been changed
from "March"), so "June" was underlined etc. So apparently, whether
the tracking markup is visible or not, change tracking seems to
affect wildcard searching. That's bad news.

Since my search is part of a macro, I suppose I could accept all
changes, run search, store location of result range, and undo the
accept. But that just seems expensive.

Any thoughts?


Graham Mayor said:
I cannot reproduce the problem using your examples. May I suggest
that you try renaming the settings sub key of the Word data key in
the registry -
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Data and clear
temp files - http://www.gmayor.com/what_to_do_when_word_crashes.htm
and then repair Word from the Word Help menu.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


The complete line is (where the whitespace after the colon is a
tab): Plan Completion Date: June 2006


:

What is the line of text that you think you are looking for with
this search pattern?

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

avcarrie wrote:
I have some strange search problems.

Sometimes if I do a wildcard search for text (that I know exists)
that includes ^013 (paragraph marker), Word does not tell me that
no results were found, yet no result is selected. To try and
find the selection/cursor, I hold shift and press an arrow key to
extend whatever resulting selection there might be in my doc. If
I tried to extend right/down, all text from the search result
(inclusive) to end of doc is selected. If I tried up/left there
is no selection, and the cursor is at start of doc.

e.g., searching for (this pattern exists in doc):

Plan Completion Date:^t[!^013]@^013

causes this behaviour but (if I add any gibberish after the final
^013)...

Plan Completion Date:^t[!^013]@^013sdfsdfsdfsdfsdfsdf

causes the same behaviour although the given pattern does not
exist in my doc.

Has anyone come across such behaviour or am I alone here? My
macros become quite useless if I can't rely on simple
search/replace. Note that I have all text / formatting / field
codes visible.
 
T

Tony Jollans

There are issues with Find and Replace and Track Changes.

I think this one may be caused by Balloons - try switching them off if you
currently have them on.

--
Enjoy,
Tony


avcarrie said:
Thanks for the suggestions Graham, but it turns out the cause lies
elsewhere.
Changes were being tracked in my document, and the line I gave:

Plan Completion Date: June 2006

had changes associated with it ("June" had at one time been changed from
"March"), so "June" was underlined etc. So apparently, whether the
tracking
markup is visible or not, change tracking seems to affect wildcard
searching.
That's bad news.

Since my search is part of a macro, I suppose I could accept all changes,
run search, store location of result range, and undo the accept. But that
just seems expensive.

Any thoughts?


Graham Mayor said:
I cannot reproduce the problem using your examples. May I suggest that
you
try renaming the settings sub key of the Word data key in the registry -
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Data and clear temp
files - http://www.gmayor.com/what_to_do_when_word_crashes.htm and then
repair Word from the Word Help menu.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


The complete line is (where the whitespace after the colon is a tab):
Plan Completion Date: June 2006


:

What is the line of text that you think you are looking for with
this search pattern?

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

avcarrie wrote:
I have some strange search problems.

Sometimes if I do a wildcard search for text (that I know exists)
that includes ^013 (paragraph marker), Word does not tell me that no
results were found, yet no result is selected. To try and find the
selection/cursor, I hold shift and press an arrow key to extend
whatever resulting selection there might be in my doc. If I tried
to extend right/down, all text from the search result (inclusive)
to end of doc is selected. If I tried up/left there is no
selection, and the cursor is at start of doc.

e.g., searching for (this pattern exists in doc):

Plan Completion Date:^t[!^013]@^013

causes this behaviour but (if I add any gibberish after the final
^013)...

Plan Completion Date:^t[!^013]@^013sdfsdfsdfsdfsdfsdf

causes the same behaviour although the given pattern does not exist
in my doc.

Has anyone come across such behaviour or am I alone here? My macros
become quite useless if I can't rely on simple search/replace. Note
that I have all text / formatting / field codes visible.
 
A

avcarrie

Thanks, works like a charm! I'm not sure why, but I don't usually use
asterisks in my searches; maybe it's because I didn't know how greedy the
search would be (and I was obviously too lazy/uneasy to experiment).


Graham Mayor said:
Try
Plan Completion Date:^t*^013
This seems to work regardless of the tracked changes provided the line still
ends with a paragraph mark..... but I don't have your document to try it on
:)

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Thanks for the suggestions Graham, but it turns out the cause lies
elsewhere. Changes were being tracked in my document, and the line I
gave:

Plan Completion Date: June 2006

had changes associated with it ("June" had at one time been changed
from "March"), so "June" was underlined etc. So apparently, whether
the tracking markup is visible or not, change tracking seems to
affect wildcard searching. That's bad news.

Since my search is part of a macro, I suppose I could accept all
changes, run search, store location of result range, and undo the
accept. But that just seems expensive.

Any thoughts?


Graham Mayor said:
I cannot reproduce the problem using your examples. May I suggest
that you try renaming the settings sub key of the Word data key in
the registry -
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Data and clear
temp files - http://www.gmayor.com/what_to_do_when_word_crashes.htm
and then repair Word from the Word Help menu.

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



avcarrie wrote:
The complete line is (where the whitespace after the colon is a
tab): Plan Completion Date: June 2006


:

What is the line of text that you think you are looking for with
this search pattern?

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

avcarrie wrote:
I have some strange search problems.

Sometimes if I do a wildcard search for text (that I know exists)
that includes ^013 (paragraph marker), Word does not tell me that
no results were found, yet no result is selected. To try and
find the selection/cursor, I hold shift and press an arrow key to
extend whatever resulting selection there might be in my doc. If
I tried to extend right/down, all text from the search result
(inclusive) to end of doc is selected. If I tried up/left there
is no selection, and the cursor is at start of doc.

e.g., searching for (this pattern exists in doc):

Plan Completion Date:^t[!^013]@^013

causes this behaviour but (if I add any gibberish after the final
^013)...

Plan Completion Date:^t[!^013]@^013sdfsdfsdfsdfsdfsdf

causes the same behaviour although the given pattern does not
exist in my doc.

Has anyone come across such behaviour or am I alone here? My
macros become quite useless if I can't rely on simple
search/replace. Note that I have all text / formatting / field
codes visible.
 
A

avcarrie

Thanks for the tip. Turning off balloons skirts the bug only if markup is
showing. Also valuable to know.


Tony Jollans said:
There are issues with Find and Replace and Track Changes.

I think this one may be caused by Balloons - try switching them off if you
currently have them on.

--
Enjoy,
Tony


avcarrie said:
Thanks for the suggestions Graham, but it turns out the cause lies
elsewhere.
Changes were being tracked in my document, and the line I gave:

Plan Completion Date: June 2006

had changes associated with it ("June" had at one time been changed from
"March"), so "June" was underlined etc. So apparently, whether the
tracking
markup is visible or not, change tracking seems to affect wildcard
searching.
That's bad news.

Since my search is part of a macro, I suppose I could accept all changes,
run search, store location of result range, and undo the accept. But that
just seems expensive.

Any thoughts?


Graham Mayor said:
I cannot reproduce the problem using your examples. May I suggest that
you
try renaming the settings sub key of the Word data key in the registry -
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Data and clear temp
files - http://www.gmayor.com/what_to_do_when_word_crashes.htm and then
repair Word from the Word Help menu.

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



avcarrie wrote:
The complete line is (where the whitespace after the colon is a tab):
Plan Completion Date: June 2006


:

What is the line of text that you think you are looking for with
this search pattern?

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

avcarrie wrote:
I have some strange search problems.

Sometimes if I do a wildcard search for text (that I know exists)
that includes ^013 (paragraph marker), Word does not tell me that no
results were found, yet no result is selected. To try and find the
selection/cursor, I hold shift and press an arrow key to extend
whatever resulting selection there might be in my doc. If I tried
to extend right/down, all text from the search result (inclusive)
to end of doc is selected. If I tried up/left there is no
selection, and the cursor is at start of doc.

e.g., searching for (this pattern exists in doc):

Plan Completion Date:^t[!^013]@^013

causes this behaviour but (if I add any gibberish after the final
^013)...

Plan Completion Date:^t[!^013]@^013sdfsdfsdfsdfsdfsdf

causes the same behaviour although the given pattern does not exist
in my doc.

Has anyone come across such behaviour or am I alone here? My macros
become quite useless if I can't rely on simple search/replace. Note
that I have all text / formatting / field codes visible.
 
G

Graham Mayor

I too prefer not to use asterisks as they are too blunt an instrument, but
sometimes needs must :)

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Thanks, works like a charm! I'm not sure why, but I don't usually use
asterisks in my searches; maybe it's because I didn't know how greedy
the search would be (and I was obviously too lazy/uneasy to
experiment).


Graham Mayor said:
Try
Plan Completion Date:^t*^013
This seems to work regardless of the tracked changes provided the
line still ends with a paragraph mark..... but I don't have your
document to try it on :)

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Thanks for the suggestions Graham, but it turns out the cause lies
elsewhere. Changes were being tracked in my document, and the line I
gave:

Plan Completion Date: June 2006

had changes associated with it ("June" had at one time been changed
from "March"), so "June" was underlined etc. So apparently, whether
the tracking markup is visible or not, change tracking seems to
affect wildcard searching. That's bad news.

Since my search is part of a macro, I suppose I could accept all
changes, run search, store location of result range, and undo the
accept. But that just seems expensive.

Any thoughts?


:

I cannot reproduce the problem using your examples. May I suggest
that you try renaming the settings sub key of the Word data key in
the registry -
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Data and
clear temp files -
http://www.gmayor.com/what_to_do_when_word_crashes.htm and then
repair Word from the Word Help menu.

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



avcarrie wrote:
The complete line is (where the whitespace after the colon is a
tab): Plan Completion Date: June 2006


:

What is the line of text that you think you are looking for with
this search pattern?

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

avcarrie wrote:
I have some strange search problems.

Sometimes if I do a wildcard search for text (that I know
exists) that includes ^013 (paragraph marker), Word does not
tell me that no results were found, yet no result is selected.
To try and find the selection/cursor, I hold shift and press an
arrow key to extend whatever resulting selection there might be
in my doc. If I tried to extend right/down, all text from the
search result (inclusive) to end of doc is selected. If I
tried up/left there is no selection, and the cursor is at start
of doc.

e.g., searching for (this pattern exists in doc):

Plan Completion Date:^t[!^013]@^013

causes this behaviour but (if I add any gibberish after the
final ^013)...

Plan Completion Date:^t[!^013]@^013sdfsdfsdfsdfsdfsdf

causes the same behaviour although the given pattern does not
exist in my doc.

Has anyone come across such behaviour or am I alone here? My
macros become quite useless if I can't rely on simple
search/replace. Note that I have all text / formatting / field
codes visible.
 

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