Sorting Items in a Folder

Items.Sort , Results.Sort, and Table.Sort allow you to sort Outlook items. This following table compares the few methods.

Items.Sort Results.Sort Table.Sort
Object of Sorting Items in an Items collection based on a folder Items in a Results collection based on a search Items in a Table object based on a folder or search folder
Applicable Properties as Sort Fields Explicit built-in properties with the exceptions listed in the Items.Sort topic Explicit built-in properties with the exceptions listed in the Results.Sort topic Explicit built-in properties and custom properties with the exception of binary and multi-valued properties
Referencing of Properties
  • By their explicit string names in the Outlook object model

  • Explicit built-in properties can only be referenced by their names in English and not any other localized language

  • By their explicit string names in the Outlook object model

  • Explicit built-in properties can only be referenced by their names in English and not any other localized language

  • By their explicit string names only; cannot reference properties by their namespaces

  • Explicit built-in properties can only be referenced by their names in English and not any other localized language

  • Custom properties can be referenced in English or a localized language

Format of Sort Fields
  • Enclosing square brackets ('['']') around explicit string names is optional

  • Property names are not case-sensitive

  • Enclosing square brackets ('['']') around explicit string names is optional

  • Property names are not case-sensitive

  • Enclosing square brackets ('['']') around explicit string names is optional

  • Property names are not case-sensitive

Error Conditions
  • Returns an error if property does not exist or property is not eligible for sorting.

  • If sort field is an empty string, no error is returned and the collection is not sorted.

  • Returns an error if property does not exist or property is not eligible for sorting.

  • If sort field is an empty string, no error is returned and the collection is not sorted.

  • Returns an error if property does not exist or property is not eligible for sorting.

  • Returns an error if sort field is an empty string

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.