Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
FileSearch to find partial words?
I have the following code in a workbook that does a text search through a
folder of Word documents: With Application.FileSearch .NewSearch .LookIn = strLocation .SearchSubFolders = False .TextOrProperty = strSearchFor .MatchAllWordForms = True .Filename = strName & "*.doc" .Execute The code works fine - except it won't find part of a word. For instance, I can't use "brak" (as strSearchFor) to find "brake", "brakes", and "braking". I had hoped the MatchAllWordForms setting would do it, but no such luck. Note: Mswds_en.lex is installed, but I have no idea if it's registered (as per MatchAllWordForms Help topic.) How would I check and rectify in need be? Ed |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
FileSearch to find partial words?
Hi Ed,
according to the help .TextOrProperty allows the use of the wildcards ? and *. Though I doubt, whether this will help you much. I'd use an invisible Word-instance together with Word's wildcard search. Not perfect, still. :-( -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
FileSearch to find partial words?
Hi, Helmut.
Actually, this can be used to solve my issue. The search terms (up to three) are typed into cells. If I put a drop-down or option button next to each term, I can allow the user to indicate if this is a complete word (default), or the beginning, end, or center bit of a word. It might need a bit more tweaking than that, but it should work out okay. Thank you! Ed "Helmut Weber" wrote in message ... Hi Ed, according to the help .TextOrProperty allows the use of the wildcards ? and *. Though I doubt, whether this will help you much. I'd use an invisible Word-instance together with Word's wildcard search. Not perfect, still. :-( -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find partial match from column A,B and fill partial match in C? | Excel Discussion (Misc queries) | |||
Find partial cell format | Excel Discussion (Misc queries) | |||
FileSearch.Execute does not find *.eml or *.lnk files | Excel Programming | |||
find partial values in cell | Excel Worksheet Functions | |||
FileSearch doesn't find zip files | Excel Programming |