Results object (Outlook)
Contains data and results returned by the Search object and the AdvancedSearch method.
The Results object contains properties and methods that allow you to view and manipulate data. For example the GetNext, GetPrevious, GetFirst, and GetLast methods allow you to search through the results and view the data by field. The Sort method allows you to sort the data.
Use the SearchObject.Results property to return a Results object.
The following event procedure stores the results of a search in a variable named objRsts and displays the results of the search in the Immediate window.
Private Sub Application_AdvancedSearchComplete(ByVal SearchObject As Search)
Dim objRsts As Outlook.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
Name |
---|
ItemAdd |
ItemChange |
ItemRemove |
Outlook Object Model Reference
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.