Microsoft KB Archive/80250

= WinWord: Searching for Multiple Extensions with File Find =

Article ID: 80250

Article Last Modified on 11/16/2006

-

APPLIES TO


 * Microsoft Word 2.0 Standard Edition
 * Microsoft Word 2.0a
 * Microsoft Office Word 2003
 * Microsoft Word 2.0c
 * Microsoft Word 6.0 Standard Edition
 * Microsoft Word 6.0a
 * Microsoft Word 6.0c
 * Microsoft Word 95 Standard Edition
 * Microsoft Word 95a
 * Microsoft Word 97 Standard Edition

-



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.



Scenario
You create a folder identified as &quot;C:\Documents&quot; 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
 Start Word. On the File menu, click Open. In the Look In box, enter C:\Documents. In the Files Of Type box, select All Files (*.*). In the File Name box, type the following and press ENTER:

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



For more information on using FileFind:

 Search for &quot;FileFind&quot; using the Help menu.

-or- Query on the following words in the Microsoft Knowledge Base:

winword and macro and filefind

</li></ul>

Word 6.0
 Start Word for Windows. From the File menu, choose Find File, and then choose the Search button.</li> In the Locations box, type:

c:\documents

</li> In the File Name box, type the following and press ENTER:

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

</li></ol>

Word 2.0
 Start Word for Windows. From the File menu, choose Find File, and then choose the Search button.</li> From the Options box, select Create New List. From the Drives box, select Path Only.</li> In the Path box, type:

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

c:\documents\*.rptc:\documents\*.txt

</li> 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.</li></ol>

<div class="references_section">