wdFindMatch 
Author Message
 wdFindMatch

I have discovered the wdFindMatch constants in the Wd97 object model library
This really would be a God-send if I could get it to work!
There's no Word help and MSDN returns nothing on "wdFindMatch"!

Can anyone make this work?

Sub FindWhiteSpace()
'Object model reports wdMatchWhiteSpace = Const 65655 = &H10077
'On the Find & Replace dialog, this is represented by ^w
'For comparison, wdMatchParagraphMark = 65551 = ^p

    With Selection.Find
        .ClearFormatting
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False

        .text = ChrW(wdMatchWhiteSpace)  
        .Replacement.text = ""
        .Forward = True
        .Execute
    End With

End Sub

Jeff Hall



Fri, 19 Sep 2003 08:50:00 GMT  
 wdFindMatch
Hi Jeff,

The Find object doesn't use these constants. However, you *can* use the
character combinations that are shown in the Find dialog.

Thus, for finding white text you would have

        .text = "^w"

The complete set of the special characters you can use is available if you
take a look at the help entry for the Execute method of the Find object.

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email


Quote:
> I have discovered the wdFindMatch constants in the Wd97 object model
library
> This really would be a God-send if I could get it to work!
> There's no Word help and MSDN returns nothing on "wdFindMatch"!

> Can anyone make this work?

> Sub FindWhiteSpace()
> 'Object model reports wdMatchWhiteSpace = Const 65655 = &H10077
> 'On the Find & Replace dialog, this is represented by ^w
> 'For comparison, wdMatchParagraphMark = 65551 = ^p

>     With Selection.Find
> .ClearFormatting
>         .Wrap = wdFindContinue
>         .Format = False
>         .MatchCase = False
>         .MatchWholeWord = False
>         .MatchWildcards = False
>         .MatchSoundsLike = False
>         .MatchAllWordForms = False

>         .text = ChrW(wdMatchWhiteSpace)
>         .Replacement.text = ""
>         .Forward = True
> .Execute
>     End With

> End Sub

> Jeff Hall



Fri, 19 Sep 2003 07:21:34 GMT  
 wdFindMatch
Hi Jonathan

Thanks for responding.

Yes, I realised this, BUT...  In German Word, the special character for white
space is "^|" and _not_ "w".  The reason I want to use the wdFindMatch constants
is to make the code language independent - I support over 30 languages!.
Over the years, I have built-up a list of special codes for things like "Field"
and "Graphic" but I don't currently know the special characters for White Space
(which I have only just introduced into the code) in any other language.

The question may come down to: what are these wdFindMatch constants used for?
or.. Where are the special character key-codes documented for International
languages?

I thought I had it when I noticed that if you deduct &H10000 from the
wdMatchWhiteSpace constant (&H10077) you get &H77, which is the character
for "w"!  However, the same rule does not apply to the wdMatchParagraphMark
constant: &H1000F - &H10000 = &H0F <> &H0D   [Paragraph = Chr(13) = Chr(&H0D)]

Quote:
> The Find object doesn't use these constants. However, you *can* use the
> character combinations that are shown in the Find dialog.

> Thus, for finding white text you would have

>         .text = "^w"

> The complete set of the special characters you can use is available if you
> take a look at the help entry for the Execute method of the Find object

--------------------------------------------------------------------
Jeff Hall MSc ARICS,  Microsoft HTML Help MVP
Director, Eon Commerce Ltd.
http://www.eon-commerce.com

Software available for you to evaluate before buying...
EasyHTML/Help CHM file Editor for MS Word
http://www.easyhtmlhelp.com
--------------------------------------------------------------------

Quote:
> I have discovered the wdFindMatch constants in the Wd97 object model library
> This really would be a God-send if I could get it to work!
> There's no Word help and MSDN returns nothing on "wdFindMatch"!

> Can anyone make this work?

> Sub FindWhiteSpace()
> 'Object model reports wdMatchWhiteSpace = Const 65655 = &H10077
> 'On the Find & Replace dialog, this is represented by ^w
> 'For comparison, wdMatchParagraphMark = 65551 = ^p

>     With Selection.Find
>    .ClearFormatting
>         .Wrap = wdFindContinue
>         .Format = False
>         .MatchCase = False
>         .MatchWholeWord = False
>         .MatchWildcards = False
>         .MatchSoundsLike = False
>         .MatchAllWordForms = False

>         .text = ChrW(wdMatchWhiteSpace)  
>         .Replacement.text = ""
>         .Forward = True
>    .Execute
>     End With

> End Sub

> Jeff Hall



Fri, 19 Sep 2003 20:18:00 GMT  
 wdFindMatch
Hi Jeff,

I believe that Word 2002 supports language-independent constants for the
find characters, but not Word 2000 or earlier. I have made many
representations to Microsoft on this, as it is an issue for me as well. For
anything like this, where you think that they are missing a feature that

the title of the message. They are probably near to finalising the feature
list for the next version of Word after Word 2002, so don't delay!

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email


Quote:
> Hi Jonathan

> Thanks for responding.

> Yes, I realised this, BUT...  In German Word, the special character for
white
> space is "^|" and _not_ "w".  The reason I want to use the wdFindMatch
constants
> is to make the code language independent - I support over 30 languages!.
> Over the years, I have built-up a list of special codes for things like
"Field"
> and "Graphic" but I don't currently know the special characters for White
Space
> (which I have only just introduced into the code) in any other language.

> The question may come down to: what are these wdFindMatch constants used
for?
> or.. Where are the special character key-codes documented for
International
> languages?

> I thought I had it when I noticed that if you deduct &H10000 from the
> wdMatchWhiteSpace constant (&H10077) you get &H77, which is the character
> for "w"!  However, the same rule does not apply to the

wdMatchParagraphMark

- Show quoted text -

Quote:
> constant: &H1000F - &H10000 = &H0F <> &H0D   [Paragraph = Chr(13) =
Chr(&H0D)]

> > The Find object doesn't use these constants. However, you *can* use the
> > character combinations that are shown in the Find dialog.

> > Thus, for finding white text you would have

> >         .text = "^w"

> > The complete set of the special characters you can use is available if
you
> > take a look at the help entry for the Execute method of the Find object

> --------------------------------------------------------------------
> Jeff Hall MSc ARICS,  Microsoft HTML Help MVP
> Director, Eon Commerce Ltd.
> http://www.eon-commerce.com

> Software available for you to evaluate before buying...
> EasyHTML/Help CHM file Editor for MS Word
> http://www.easyhtmlhelp.com
> --------------------------------------------------------------------
> > I have discovered the wdFindMatch constants in the Wd97 object model
library
> > This really would be a God-send if I could get it to work!
> > There's no Word help and MSDN returns nothing on "wdFindMatch"!

> > Can anyone make this work?

> > Sub FindWhiteSpace()
> > 'Object model reports wdMatchWhiteSpace = Const 65655 = &H10077
> > 'On the Find & Replace dialog, this is represented by ^w
> > 'For comparison, wdMatchParagraphMark = 65551 = ^p

> >     With Selection.Find
> > .ClearFormatting
> >         .Wrap = wdFindContinue
> >         .Format = False
> >         .MatchCase = False
> >         .MatchWholeWord = False
> >         .MatchWildcards = False
> >         .MatchSoundsLike = False
> >         .MatchAllWordForms = False

> >         .text = ChrW(wdMatchWhiteSpace)
> >         .Replacement.text = ""
> >         .Forward = True
> > .Execute
> >     End With

> > End Sub

> > Jeff Hall



Sat, 20 Sep 2003 00:21:04 GMT  
 wdFindMatch
Wish List Email sent!

Do you know if MS has documented the "Find & Replace" special characters
for International Word versions?

Jeff Hall MSc ARICS
Director, Eon Commerce Ltd, +44 (0) 1494 581244
http://www.easyhtmlhelp.com/
Microsoft HTML Help Most Valuable Professional 2000/01
http://msdn.microsoft.com/library/tools/htmlhelp/wkshp/mvpjhall.htm

Quote:
> Hi Jeff,

> I believe that Word 2002 supports language-independent constants for the
> find characters, but not Word 2000 or earlier. I have made many
> representations to Microsoft on this, as it is an issue for me as well. For
> anything like this, where you think that they are missing a feature that

> the title of the message. They are probably near to finalising the feature
> list for the next version of Word after Word 2002, so don't delay!

> --
> Regards
> Jonathan West - Word MVP
> MultiLinker - Automated generation of hyperlinks in Word
> Conversion to PDF & HTML
> http://www.multilinker.com
> Word FAQs at http://www.multilinker.com/wordfaq
> Please post any follow-up in the newsgroup. I do not reply to Word questions
> by email



Sat, 20 Sep 2003 18:45:00 GMT  
 wdFindMatch
Its in the help file for each language version. I'm not aware that they have
been gathered together in any centralised place through.

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email


Quote:
> Wish List Email sent!

> Do you know if MS has documented the "Find & Replace" special characters
> for International Word versions?

> Jeff Hall MSc ARICS
> Director, Eon Commerce Ltd, +44 (0) 1494 581244
> http://www.easyhtmlhelp.com/
> Microsoft HTML Help Most Valuable Professional 2000/01
> http://msdn.microsoft.com/library/tools/htmlhelp/wkshp/mvpjhall.htm

> > Hi Jeff,

> > I believe that Word 2002 supports language-independent constants for the
> > find characters, but not Word 2000 or earlier. I have made many
> > representations to Microsoft on this, as it is an issue for me as well.
For
> > anything like this, where you think that they are missing a feature that

in
> > the title of the message. They are probably near to finalising the
feature
> > list for the next version of Word after Word 2002, so don't delay!

> > --
> > Regards
> > Jonathan West - Word MVP
> > MultiLinker - Automated generation of hyperlinks in Word
> > Conversion to PDF & HTML
> > http://www.multilinker.com
> > Word FAQs at http://www.multilinker.com/wordfaq
> > Please post any follow-up in the newsgroup. I do not reply to Word
questions
> > by email



Sat, 20 Sep 2003 19:52:16 GMT  
 wdFindMatch
Would anyone with an International version of Word kindly let me know the
special "Find & Replace" - "White Space" character for your language version
...please?

Quote:
> > Do you know if MS has documented the "Find & Replace" special characters
> > for International Word versions?
> Its in the help file for each language version. I'm not aware that they have
> been gathered together in any centralised place through.

Jeff Hall MSc ARICS
Director, Eon Commerce Ltd, +44 (0) 1494 581244
http://www.easyhtmlhelp.com/
Microsoft HTML Help Most Valuable Professional 2000/01
http://msdn.microsoft.com/library/tools/htmlhelp/wkshp/mvpjhall.htm


Sun, 21 Sep 2003 01:02:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 
 

 
Powered by phpBB® Forum Software