FileTypes Object (Office)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

A collection of values of the type msoFileType that determine which types of files are returned during a search.

There is only one FileTypes collection for all searches so it's important to clear the FileTypes collection before executing a search unless you wish to search for file types from previous searches. The easiest way to clear the collection is to set the FileType property to the first file type for which you want to search. You can also remove individual types using the Remove method. To determine the file type of each item in the collection, use the Item method to return the msoFileType value.

Show: