Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Feb 2001
    Location
    Washington, District Of Columbia, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MatchWholeWord in Word2000

    When I execute FIND in Word 2000 vba to replace a phrase in a document, I am having problems using MatchWholeWord if the phrase contains a space. I am trying to change iMIS W where it is found, and not change iMIS Web. MatchWholeWord is set to true, yet it replaces in both cases. Any ideas for a work around?
    In PowerPoint (where Find has been broken since at least Office 95) I have to put the entire text box into a variable, use string search and then replace all of the text, but the size of Word documents makes this impracticable as well as inelegant.

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: MatchWholeWord in Word2000

    Hi,

    MatchWholeWord probably isn't working because you're feeding it two "words".

    If you set MatchWildcards to True, the following search string should find only your "iMIS W" strings:

    "iMIS W>" - the ">" indicating "end of word".

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •