WinWord: Searching for Multiple Extensions with File Find (80250)



The information in this article applies to:

  • Microsoft Word for Windows 2.0
  • Microsoft Word for Windows 2.0a
  • Microsoft Word for Windows 2.0b
  • Microsoft Word for Windows 2.0c
  • Microsoft Word for Windows 6.0
  • Microsoft Word for Windows 6.0a
  • Microsoft Word for Windows 6.0c
  • Microsoft Word for Windows 95
  • Microsoft Word for Windows 95 7.0a
  • Microsoft Word 97 for Windows

This article was previously published under Q80250

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

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB80250