Results Property
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Returns a Results collection that specifies the results of the search.
expression.Results
expression Required. An expression that returns a Search object.
Example
The following event procedure example stores the results of a search in a variable called objRsts and prints the results of the search in the Immediate window. Always use the AdvancedSearchComplete event to ensure the results of the search.
Private Sub Application_AdvancedSearchComplete(ByVal SearchObject As Search)
Dim objRsts As Results
MsgBox "The search " & SearchObject.Tag & "has completed. The scope of the search was " & _
SearchObject.Scope & "."
Set objRsts = SearchObject.Results
'Print out number in Results collection
Debug.Print objRsts.Count
'Print out each member of Results collection
For Each Item In objRsts
Debug.Print Item
Next
End Sub