FileSearch.Execute Method

Begins the search for the specified file(s).

Namespace:  Microsoft.Office.Core
Assembly:  office (in office.dll)

int Execute(
	MsoSortBy SortBy,
	MsoSortOrder SortOrder,
	bool AlwaysAccurate
)

Parameters

SortBy
Type: Microsoft.Office.Core.MsoSortBy

Optional MsoSortBy. The method used to sort the returned file(s).

SortOrder
Type: Microsoft.Office.Core.MsoSortOrder

Optional MsoSortOrder. The order in which the returned file(s) are sorted.

AlwaysAccurate
Type: System.Boolean

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

Return Value

Type: System.Int32

This property returns an Integer: zero (0) if no files are found, or a positive number if one or more files are found.

Show: