Solved

Using the Find/Restrict method with wildcard characters

Posted on 1998-08-31
1
987 Views
Last Modified: 2008-02-01
Is it possible to use wildcard characters with the Find or Restrict methods using VBA from Word 97. It seems that =,>,<,<>,>=,<=,And,Or and Not are the only operators available. If thats the case how do you look up all the people with "Smith" in their name ex. Smithson,Blacksmith or just plain Smith?
0
Comment
Question by:harry526000
1 Comment
 
LVL 1

Accepted Solution

by:
drepetto earned 100 total points
ID: 1621524
Word searches accepts wildcards.

Here you got an example

 Selection.Find.ClearFormatting
    With Selection.Find
        .Text = "as*we"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = True
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute
    Selection.Find.Execute
End Sub

Hope this responded all your questions.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question