To Jay Freedman - More on Find Match Exact

J

JBNewsGroup

Hi Jay,

This refers to the post of 2/16/2005 (Need Help With Find) regarding Find
and exact matches.

During code debug I found that I had to modify the wildcard search string.
I had a data item *E1. In the table I had entries such as *BE1 and *CE1.
Using *E1 with the string \*E1> I got a hit on the *BE1. I modified the
wildcard string to \*<E1> which gave me the exact match.

Am I correct in assuming that Word treats all non Alpha-Numeric characters,
with the exception of wildcard codes, as a unique word or item? In other
words if I sequentially scan a paragraph for each word then I will get any
non Alpha-Numeric character as a unique item.

Thanks for your patience in answering my questions. It seems that the deeper
I get into VBA the more questions pop up.

Jerry Bodoff
 
J

Jay Freedman

Hi Jerry,

I think your analysis is correct. Unfortunately, Microsoft's documentation
of this feature, like many others, is very skimpy on details, so we're left
poking at a black box to try to figure out the rules. The only way to know
unambiguously would be to get a Word developer to look at the underlying code
and tell us how it decides what matches. If it's very important to clear an
ambiguous behavior, or if it's clearly buggy, I could escalate the question
through our MVP lead.
 
J

JBNewsGroup

Hi Jay,

Thanks for your reply.

It is not all that important to me personally. The question was mainly for
my own inquisitiveness. I am an old time systems programmer and am used to
programming around software quirks.

If you think it does any good , go ahead and escalate it. If there is a
response it could benefit a lot of users, especially if Microsoft publishes
a KB article regarding this. I wonder how many others have, or had, this
problem and just gave up. I know a lot of people who do not know these
newsgroups even exist.

For now, I am going to assume that I am correct and "rack it up" to another
Microsoft mystery. I once had a discussion with Suzanne and we both agreed
that Microsoft should put some of their developers in the end user's shoes.
I am willing to bet that once the developers are in the real world we would
get results, at least something a little more user friendly. In some of the
companies I worked for as a consultant it was a requirement that the
developing staff go through end user's training before a pencil was put to
paper. I will say that some useful software got developed (some is even
running today after 10 years).

Once again, thanks for your reply.

Jerry Bodoff
 
K

Klaus Linke

Using *E1 with the string \*E1> I got a hit on the *BE1.


Hi Jerry,

Sure? I can't repro this (Word2003).

Sometimes, wildcard expressions can be ambiguous, and it's hard to say how
they'll work without trying.

And sometimes, expressions that should work don't.

I'm not sure whether this is either, though:
It doesn't seem to be ambiguous, and it doesn't look like any bug I've run into.

Greetings,
Klaus
 
J

JBNewsGroup

Hi Klaus,

Went nuts with this one. I am using Word2000 and maybe things have been
corrected or changed in Word2003. I definitely hit on the *BE1, and any
other table entry that was in the form of *cE1 where c is any character. I
will set up another table and an independent macro and re-test the search.
It makes no sense to me why \*<E1> works and \*E1 does not. It is as if the
\ is ignored (????). As I mentioned to Jay, another one of those Microsoft
mysteries.

Jerry B
 
J

JBNewsGroup

Hi Klaus,

I forgot to mention that I am using a Range object. When I re-test I will
try with a Range and a Selection object. Maybe that will make a difference.
I have found in the past that some things work
differently depending on a Range or Selection object.

Jerry B
 

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