Search.Tag Property
Outlook Developer Reference |
Returns a String specifying the name of the current search. The Tag property is used to identify a specific search. Read-only.
Syntax
expression.Tag
expression A variable that represents a Search object.
Remarks
The Tag property is set by using the AdvancedSearch method when the Search object is created.
Example
The following Visual Basic for Applications (VBA) example searches through the user's Inbox for all items that do not have a flag. The name "FlagSearch", specified by the Tag property, is given to 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, and the TestAdvancedSearchComplete()
subroutine must be called before the event procedure can be called by Outlook. The AdvanceSearchComplete
event procedure displays the tag to the user so the user can identify which search was completed because usually the search is asynchronous (use the IsSynchronous property to determine if the search will be synchronous or asynchronous), and you can execute multiple searches simultaneously.
Visual Basic for Applications |
---|
|
See Also