Execute Method (FileSearch Object)

         Example         Applies To         Specifics

FileSearch object: Begins the search for the specified files.

Syntax 1

expression.Execute(SortBy, SortOrder, AlwaysAccurate)

expression   Required. An expression that returns a FileSearch object.

SortBy   Optional Variant. The method used to sort the returned files. Can be one of the following MsoSortBy constants: msoSortbyFileName, msoSortbyFileType, msoSortbyLastModified, or msoSortbySize.

SortOrder   Optional Variant. The order in which the returned files are sorted. Can be either of the following MsoSortOrder constants: msoSortOrderAscending or msoSortOrderDescending.

AlwaysAccurate   Optional Boolean. True to have the file search include files that have been added, modified, or deleted since the file index was last updated. The default value is True.