Export (0) Print
Expand All

Sorting Items in a Folder

Office 2007

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

Items.SortResults.SortTable.Sort
Object of Sorting Items in an Items collection based on a folderItems in a Results collection based on a search Items in a Table object based on a folder or search folder
Applicable Properties as Sort FieldsExplicit built-in properties with the exceptions listed in the Items.Sort topicExplicit built-in properties with the exceptions listed in the Results.Sort topicExplicit 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



Community Additions

ADD
Show:
© 2014 Microsoft