Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 163
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find partial match from column A,B and fill partial match in C? Tacrier Excel Discussion (Misc queries) 4 October 24th 08 11:24 PM
Find partial cell format icq_giggles Excel Discussion (Misc queries) 7 July 21st 07 12:02 AM
FileSearch.Execute does not find *.eml or *.lnk files RosH Excel Programming 3 December 8th 05 08:30 AM
find partial values in cell Luke Excel Worksheet Functions 1 September 18th 05 03:46 PM
FileSearch doesn't find zip files Hub van de Laar Excel Programming 3 September 1st 03 07:43 PM


All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"