WinWord: Searching for Multiple Extensions with File Find

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, 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:


  5. *.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:


  3. c:\documents
  4. In the File Name box, type the following and press ENTER:


  5. *.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:


  4. c:\documents\*.bba;c:\documents\*.doc;c:\documents\*.log;
    c:\documents\*.rptc:\documents\*.txt
  5. 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

Additional query words: greyed dimmed grayed gray grey winword 2.0 winword2 6.0 word6 8.0 word8 word97

Keywords :
Version : WINDOWS:2.0,2.0a,2.0a-CD,2.0b,2.0c,6.0,6.0a,6.0c,7.0,7.0a,97
Platform : WINDOWS
Issue type :


Last Reviewed: November 4, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.