Muokkaa

Jaa


Results.Sort method (Outlook)

Sorts the collection of items by the specified property. The index for the collection is reset to 1 upon completion of this method.

Syntax

expression.Sort (Property, Descending)

expression A variable that represents a Results object.

Parameters

Name Required/Optional Data type Description
Property Required String The name of the property by which to sort, which may be enclosed in brackets (for example, "[CompanyName]"). May not be a user-defined field, and may not be a multi-valued property, such as a category.
Descending Optional Variant True to sort in descending order. The default value is False (ascending).

Remarks

Sort only affects the order of items in a collection. It does not affect the order of items in an explorer view.

See also

Results 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.