Results 1 to 10 of 10
  1. #1
    New Lounger
    Join Date
    Jan 2015
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Using FileSearch again

    There are any number of posts both in this forum and out on the big wide net asking about the depracation of FileSearch - but they all seem to be concerned with finding the filename, which can be done in other ways very easily. I've always used Application.FileSearch with the msoConditionIncludesPhrase parameter, to find files containing key words or phrases. I've yet to find any working alternative (short of finding all word documents, opening each one and doing a search which would work, but be painfully slow and tie up the machine too much). I've found tantalising teasers as to possible ways round it (the windows search apparently is programmable, but finding the HOW has been difficult to say the least). IF any of the experts on here can come up with working methods I'd love to hear them (and indeed try them out!)

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. The Following User Says Thank You to Andrew Lockton For This Useful Post:

    AidanH (2015-02-02)

  4. #3
    New Lounger
    Join Date
    Jan 2015
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts
    It looks promising, BUT it is set to query all files on the c:\ drive of the machine running it - I didn't specify it in the original question, but this search is done on specified locations on the network - I'm not sure if this method would work on a networked drive (but I'll investigate - unless anyone beats me to it!)

  5. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Try the class file from: http://dl.dropbox.com/u/35239054/FileSearch.cls
    To use it:
    • Open the VBA editor
    • Import the file (press CTRL-M)
    • Ensure a reference to the Microsoft Office Object Library in the VBE's Tools|References.
    • Create a variable of type FileSearch and use it as per any office version before 2007.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  6. The Following User Says Thank You to macropod For This Useful Post:

    AidanH (2015-02-12)

  7. #5
    New Lounger
    Join Date
    Jan 2015
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts
    It looks good, but I've read through the code and it doesn't SEEM to have a method for looking for text within the document - or did I miss something?

  8. #6
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    For queries like that, I suggest you contact the author. You may be able to make contact via: http://answers.microsoft.com/en-us/o...8-84f28300dba4

    Of course, if you keep an older version of Office (pre-2007) installed, you'll still have recourse to Application.FileSearch with the newer versions.
    Last edited by macropod; 2015-02-12 at 04:29.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  9. The Following User Says Thank You to macropod For This Useful Post:

    AidanH (2015-02-12)

  10. #7
    New Lounger
    Join Date
    Jan 2015
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks again - we do have laptops in the office with older versions of Office, so at the moment, they do the job, but I'm restricted as to what software I have based on what the company policy says! I suspect that unless and until Microsoft see the error of their ways, I may have an insoluble problem!

  11. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Marietta, Georgia, USA
    Posts
    296
    Thanks
    9
    Thanked 4 Times in 4 Posts
    I had a similar need for a better File Search, which was based on searching for "all word forms" in MS Word 2000:
    http://windowssecrets.com/forums/sho...ord-forms-quot

    I did not attempt to write any code to do this, since it is beyond my skill level. I did find a program named BareGrep that searches within MS Word documents. There is a free version as well as a paid version:
    http://www.baremetalsoft.com/baregrep/
    Rick Groszkiewicz
    Life is too short to drink bad wine (or bad coffee!)

  12. #9
    New Lounger
    Join Date
    Jan 2015
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thaks Rick - unfortunately, in my case the filesearch requirement is within a corporate office, and what we can have on our computers is very prescribed!

  13. #10
    New Lounger
    Join Date
    Jan 2015
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts
    and today our laptops get upgraded, thus removing the option - all attempts so far have failed, even the SQL query method (which looked so promising, but searching network drives appears to cause (not unreasonably) this to fail to work - I can only imagine the size of a locally stored index to the entire network of a corporate!! IF anyone can come up with a method that will work without installing extra software (because we cannot) do let me know - at the moment, I'm seriously thinking of creating a beast of a database and importing the contents of the files to it, but somehow I don't think I'll ACTUALLY do it even though that would at least work (after running my convert fields to text macro of course!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •