Application.AdvancedSearchComplete Event
Outlook Developer Reference |
Occurs when the AdvancedSearch method has completed.
Syntax
expression.AdvancedSearchComplete(SearchObject)
expression A variable that represents an Application object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
SearchObject | Required | Search | The Search object returned by the AdvancedSearch method. |
Remarks
The AdvancedSearchComplete event is used to return the object that was created by the AdvancedSearch method. This event only fires when the AdvancedSearch method is executed programmatically.
Example
The following Visual Basic for Applications (VBA) example searches the Inbox for items where the subject is equal to "Test" and displays the names of the senders of the e-mail items returned by the search. The AdvanceSearchComplete
event procedure sets the boolean blnSearchComp
to True when the search is complete. This boolean variable is used by the TestAdvancedSearchComplete()
procedure to determine when the search is complete. The sample code must be placed in a class module such as ThisOutlookSession
. The TestAdvancedSearchComplete()
procedure must be called before the event procedure can be called by Microsoft Outlook.
Visual Basic for Applications |
---|
|
See Also