Solved

Using the Find/Restrict method with wildcard characters

Posted on 1998-08-31
1
982 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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 …

943 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now