Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    May 2001
    Location
    Philadelphia, Pennsylvania
    Posts
    676
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Keywords in searches

    I have been putting some text in the Keywords field of excel files I handle, for use in developing some metrics. Now, I cannot seem to find out how to query the folder that has these key-worded-files for the particular keyword, for instance "ssc" so I can count them. The search pane in Explorer is distinctly unhelpful. I see no keyword reference there, and the help in 2000 doesn't seem to have much either. Thanks.

  2. #2
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keywords in searches

    Keywords are something that you can Search on using Excel VBA. I do not recall any other way that you can approach them. Would an Excel VBA solution meet your needs?
    Gre

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Philadelphia, Pennsylvania
    Posts
    676
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keywords in searches

    Perhaps...but I am "certain" that these things ought to be accessible in other ways. I have a folder containing excel files. I want to count the number of files that have the keyword "ssc" in that file property field. Can VBA do that without having to open each file?

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Keywords in searches

    They are accessible via the "built-in" doc properties" in Excel VBA

    <pre>sKeywords = activeworkbook.builtindocumentproperties("Keywords ")</pre>


    will put the keywords in the variable sKeywords which you can use the LIKE operator or INSTR function to search for something in it.

    Steve

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Keywords in searches

    You can use the FileSearch object in Office VBA to search for keywords, or use the DSOFile.dll from Microsoft, again in VBA (or VB). I will move this thread to the VB/VBA forum, since any solution is likely to involve coding.

  6. #6
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keywords in searches

    In the Excel Object Model, both BuiltInDocumentProperties and CustomDocumentProperties are part of ActiveWorkbook - and not simply Workbook. This means having to Open each Workbook to inspect the Properties.

    I suspect that this may also be the case with the FileSearch object mentioned by <!profile=HansV>HansV<!/profile>.
    Gre

  7. #7
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keywords in searches

    Is the Indexing Service enabled on your system? If memory serves, this is one of the things that it catalogs for searches using the system Search function.
    -Mark

Posting Permissions

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