Solved

Using the Find/Restrict method with wildcard characters

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Resolve DNS query failed errors for Exchange
Read this checklist to learn more about the 15 things you should never include in an email signature.
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 video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

773 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