Rediger

Del via


Application.IsSearchSynchronous method (Outlook)

Returns a Boolean indicating if a search will be synchronous or asynchronous.

Syntax

expression. IsSearchSynchronous( _LookInFolders_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
LookInFolders Required String The path name of the folders that the search will search through. You must enclose the folder path with single quotes.

Return value

True if the search is synchronous; otherwise, False.

Remarks

If the search is synchronous, the AdvancedSearch method will not return until the search has completed. Conversely, if the search is asynchronous, the AdvancedSearch method will immediately return. In order to get meaningful results from an asynchronous search, use the AdvancedSearchComplete event to notify you when the search has finished.

Example

Sub TestStoresForSynchronousSearch() 
 
 Dim folderPath As String 
 
 Dim oStore As Outlook.Store 
 
 For Each oStore In Outlook.Session.Stores 
 
 folderPath = "'" & oStore.GetRootFolder.folderPath & "'" 
 
 Debug.Print folderPath & " IsSearchSynchronous = " & _ 
 
 Application.IsSearchSynchronous(folderPath) 
 
 Next 
 
End Sub

See also

Application Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.