What replaced the Application.FileSearch for Word?

S

StephenW

I have a macro which has been using the Application.FileSearch to find some
files, but when I try to run this macro in Word2007 I get the 5111 error -
"This command not availible on this platform".

How do I now search a directory for files in MSWord2007?
 
K

Karl E. Peterson

StephenW said:
I have a macro which has been using the Application.FileSearch to find some
files, but when I try to run this macro in Word2007 I get the 5111 error -
"This command not availible on this platform".

How do I now search a directory for files in MSWord2007?

Sounds like you might actually have to use VBA for that. (Don't listen to those
who'll urge FSO!)

Here's a drop-in class that works pretty well:

http://vb.mvps.org/samples/DirDrill
 
S

StephenW

The macro, actually a collection of macros, are written in VBA for Word. It
also uses some Excel code. I thought that maybe I was missing my reference
to the Excel object library, but when I check the reference dialoge the MS
Excel 11.0 Object Library is checked. I can not find a reference for an
Excel 12.0 Object Library in the list. There are MS Word 12.0 and MS Office
12.0 Object Libray references and I have both selected. I mention this
because the Application.FileSearch object still shows up under Excel in the
object browser.

I can't believe that got rid of this type of search form inside a program in
Word with out some type of replacement.
Thanks for your Help
Steve
 
K

Karl E. Peterson

StephenW said:
I can't believe that got rid of this type of search form inside a program in
Word with out some type of replacement.

Sadly, that *is* the general direction Microsoft is headed...

The marketing term for it is, "churn." (See my sig.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top