Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search VFP Path and Subfolders for DOC files.
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00630625
Message ID:
00630630
Views:
16
Hi, Elgin!

Here are some different ideas:

1. Include all existing subdirectories in the SET PATH setting.
BTW: This is not a good idea if you a have dynamic directory structure!

2. Use the RUN command to run the DIR command from OS including the "searching subdirectories" switch, redirect the output into an file an parse it!
BTW: This is easy to do, but it produces an upcoming black DOS screen!
BTW: May be there is a function in an equal manner within API or Scripting host!

3. Create a recursive VFP function using ADIR() to dig into the sub directories.
BTW: This may be the best VFP like way <s>!


BTW: In all cases you have to find the exactly location of the Word document before calling "oDoc = oWord.Documents.Open(lcDocument)"!
SeBaFlu
Previous
Reply
Map
View

Click here to load this message in the networking platform