WinWord: Searching for Multiple Extensions with File Find

Last reviewed: February 5, 1998
Article ID: Q80250
The information in this article applies to:
  • Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 97 for Windows

SUMMARY

In Microsoft Word for Windows, you can use the Open command on the Find menu (or the File Find command for Word versions 6.0 and earlier) to search for files that have different extensions but are in the same directory. However, the search path is limited to 255 characters. If the search path reaches or exceeds the 255-character limit, the path line will be unavailable. You must use Edit Path and delete some search entries to make the path available. One way to circumvent this limitation is to use a WordBasic macro to set up multiple search iterations.

MORE INFORMATION

Scenario

You create a folder identified as "C:\Documents" and move all of your text- based files to this folder. In C:\Documents, you have files with eight different extensions; however, in this example you want only five of these extensions to be maintained in the search list. The five extensions you want included in the search list are .bba, .doc, .log, .rpt, and .txt.

To set up File Find to search for the different extensions within the same directory, use the following steps:

Word 97, 7.0

  1. Start Word. On the File menu, click Open.

  2. In the Look In box, enter C:\Documents.

  3. In the Files Of Type box, select All Files (*.*).

  4. In the File Name box, type the following and press ENTER:

          *.bba;*.doc;*.log;*.rpt;*.txt
    

For more information on using FileFind:
  • Search for "FileFind" using the Help menu.

    -or-

  • Query on the following words in the Microsoft Knowledge Base:

           winword and macro and filefind
    

Word 6.0

  1. Start Word for Windows. From the File menu, choose Find File, and then choose the Search button.

  2. In the Locations box, type:

          c:\documents
    

  3. In the File Name box, type the following and press ENTER:

          *.bba;*.doc;*.log;*.rpt;*.txt
    

Word 2.0

  1. Start Word for Windows. From the File menu, choose Find File, and then choose the Search button.

  2. From the Options box, select Create New List. From the Drives box, select Path Only.

  3. In the Path box, type:

          c:\documents\*.bba;c:\documents\*.doc;c:\documents\*.log;
          c:\documents\*.rptc:\documents\*.txt
    

  4. In the Search dialog box, choose the Start Search button. The results containing the files with multiple extensions will appear in the File Find dialog box.

REFERENCES

"Microsoft Word for Windows User's Guide," version 2.0, pages 494, 498


KBCategory: kbusage
KBSubcategory:
Additional query words: greyed dimmed grayed gray grey winword 6.0c
winword 2.0 2.0a 2.0a-CD 2.0b 2.0c winword2 6.0 6.0a 6.0c word6
8.0 word8 word97

Version : 2.x 6.0 6.0a 6.0c 7.0 7.0a
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.