Export (0) Print
Expand All

_Table.Sort Method

Sorts the rows of the Table by the property specified in SortProperty and resets the current row to just before the first row in the Table.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

[DispIdAttribute()]
void Sort(
	string SortProperty,
	Object Descending
)

Parameters

SortProperty
Type: System.String

Specifies the property to use to sort the rows of the Table.

Descending
Type: System.Object

Whether to sort the Table in descending order.

SortProperty can be any explicit built-in property or custom property, with the exception of binary and multi-valued properties. The property must be referenced by its explicit string name; it cannot be referenced by namespace. For futher information on specifying sort properties, see Sorting Items in a Folder.

Sorting the table is equivalent to calling a MoveToStart method. The cursor will be positioned to the start of the Table.

If Table.Sort and then _Table.Restrict are called, the filtered items in the new Table will be sorted by the same SortProperty and SortOrder.

Table.Sort only supports sorting on a single column.

Show:
© 2014 Microsoft