E
Ed
I have a macro which uses FileSearch to do a text search of Word documents
in a specified folder. These documents are named by their report number,
which begins with "L5-", has a varying letter designator, and then a report
number. Currently, the user can input the letter designator into a cell,
which yields "strName" to constrain the search to a general report series.
What I would like to be able to do is filter my worksheet for more specific
parameters, then use the results as the FileName property.
For instance, if I have 1400 "D" series reports, but the data I want may be
contained only in 100 of them and I can filter down to that group of 100,
how can I loop through my filtered column to use each cell value as the
FileName?
Ed
With Application.FileSearch
.NewSearch
.LookIn = strLocation
.SearchSubFolders = False
.TextOrProperty = strSearchFor
.Filename = "L5-" & strName & "*.doc"
.Execute
in a specified folder. These documents are named by their report number,
which begins with "L5-", has a varying letter designator, and then a report
number. Currently, the user can input the letter designator into a cell,
which yields "strName" to constrain the search to a general report series.
What I would like to be able to do is filter my worksheet for more specific
parameters, then use the results as the FileName property.
For instance, if I have 1400 "D" series reports, but the data I want may be
contained only in 100 of them and I can filter down to that group of 100,
how can I loop through my filtered column to use each cell value as the
FileName?
Ed
With Application.FileSearch
.NewSearch
.LookIn = strLocation
.SearchSubFolders = False
.TextOrProperty = strSearchFor
.Filename = "L5-" & strName & "*.doc"
.Execute