I'll give you this much...
http://support.microsoft.com/?kbid=210613
See the note towards the bottom. This is because the Office type library
doesn't get installed with the runtime.
Now, technically, the FileSearch property is implemented/available in the
runtime, but the property is just an accessor function to the FileSearch
object in the Office type library. It MIGHT work if you've installed a
runtime version of Access and the proper version of Office is already
installed. I've never bothered to check that...but its iffy anyway. If
you're installing runtime, you have to assume Office isn't installed, so...
1. You cannot have a reference to the Office library
2. You have to declare your variable for the FileSearch object as a variant
and assign it from the FileSearch property of the Application object...no
intellisense
3. You cannot use the enums associated with the object...you have to create
your own constants
4. You have to trap for any error and implement an alternate method (i.e.,
Dir or an API function) in the event that it doesn't work
Given 4, why bother? Sure, it might be a little more robust than Dir for
searching sub folders, but if you can't count on using it, it isn't much
good.
And even if you could legally redistribute, in the latest PDW, the generated
installer doesn't register any components referenced by the developer (i.e.,
libraries, ActiveX) anyway. You have to register them using a work around
(or another installer).
Less references = Less headaches!