Unexpected results with Find and Replace dialog, Word 2003

M

Mike Unwalla

When the 'Find all word forms (English)' option is selected, Word returns
incorrect results for a few words ('as', 'it', 'of', 'to', and a few others).
For example, consider the sentence, "Of all software, Microsoft is best." In
addition to finding 'Of', the search also finds 'of' in 'software' and in
'Microsoft'.

(I know that normally you would not use 'Find all word forms (English)' with
such words if you were searching using the 'Find and Replace' dialog. In my
case, I am using macros to manipulate text, and consequently found the
unexpected behaviour that I have described.)
 
T

Terry Farrell

Select 'Find Whole Words Only' option by clicking on MORE in the Find (or
replace) dialog.
 
B

Bob Buckland ?:-\)

Hi Terry,

I don't know this feature well enough to know how extensive its capabilities are (see below). In the UI you can't select the
'Whole Words' choice when using 'all word forms (English), but this note in help seems to be imply that you don't need to, but when
did having an option be dimmed out and unchecked mean that the option is automatically 'on'?

"When the Use wildcards check box is selected, Word finds only the exact text you specify. (Notice that the Match case and Find
whole words only check boxes are unavailable (dimmed) to indicate that these options are automatically on; you can't turn off these
options.) "

Can you, using a macro set both options to true?

Anyway -here's a quick check that I did and the results.


Ctrl+F - Find and highlight results in Word 2003 SP3, with the option for
'Find all word forms (English) ' selected

Search on
as, it, of, to

using the following sample text lines:

1. 'as'
As this was a special occasion we wasted no time in washing out the ashes.

2. 'it'
It was a well lit set; we had well fitting round to-its;, a six pack of Schlitz and he chose to profit from her actions.

3. 'of'
Of all the software, Microsoft is best

4. 'to'
To all of us, today was the right day to raise a toast to our town.

#1 'as' found 'as' and 'a'.
#2 'it' found - 'it' and 'its'
#3 'of' found - 'of', 'profit', 'software' and 'Microsoft'
#4 'to' found - 'to', 'toast' and 'town'

Note that a weird part is that even if you select the whole document and apply another language to the text the 'find result' is
still the same looking for all word forms (English).

From the help file - the feature mentions (at least for the examples)

"Find and replace noun or adjective forms or verb tenses

You can search for:
Singular and plural noun forms

For example, replace "apple" with "orange" at the same time that you replace "apples" with "oranges".

All adjective forms
For example, replace "worse" with "better" at the same time that you replace "worst" with "best".

All tenses of a root verb
For example, replace "sit" with "stand" at the same time that you replace
"sat" with "stood".

============
Select 'Find Whole Words Only' option by clicking on MORE in the Find (or
replace) dialog.

--
Terry Farrell - MSWord MVP >>
--

Bob Buckland ?:)
MS Office System Products MVP

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

Mike Unwalla

Bob asks, "Can you, using a macro set both options to true?"

Yes, you can.

In a macro, I set:
.MatchWholeWord = True
.MatchAllWordForms = True

The macro ran without error.

However, the Boolean flag for MatchWholeWord has no effect (whether you set
it to True or to False, the strangeness with matching on all word forms
persists).
 

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