Share via

Searching a folder for all word docs that have a particular field code

Anonymous
2016-10-11T17:21:02+00:00

I do constant work with modular documents...Documents that use extensive field codes, such as {includetext "c:\users\john\attachment.docx"}.

I need to be able to display a folder, and use some kind of advanced find technique to find all docs in that folder that, for example, contain the text c:\users\john\attachment.docx.

Currently, I have to open each and every document in the folder, one at a time, then, with my field codes displayed (which is my default, by the way), use Word's search to find the text string that is incorporated in the {includetext} field.

Same for {mergefield}s, {set}, {choice}, etc.

I will be glad to know of a 3rd party utility if MSOffice is not my answer...

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2016-10-12T23:53:55+00:00

    Yes, "identify" could mean create a list. If there is no utility that just displays the matching docs (such as the Windows built-In Explorer Search) then a list will be an acceptable substitute.

    I sure wish Microsoft could find their own document contents through a search, though. Don't you?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2016-10-12T22:50:58+00:00

    What does "identify" mean in this case?   It would be possible to modify the macro in the article for which I gave you the reference so that it simply created a list of the documents that contained that particular field.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-10-12T19:24:03+00:00

    That's basically what I'm doing, with the added help of automating the opening of all docs in the folder. And thanks for that. But...

    I was hoping for a utility that would just identify any docs that have the field codes, similar to the Windows Search/Find feature.

    Was this answer helpful?

    0 comments No comments
  4. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2016-10-12T02:37:01+00:00

    See the article "Find & ReplaceAll on a batch of documents in the same folder” at:

    http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm

    Was this answer helpful?

    0 comments No comments