共用方式為


_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)

Syntax

'Declaration
<DispIdAttribute()> _
Sub Sort ( _
    SortProperty As String, _
    Descending As Object _
)
'Usage
Dim instance As _Table
Dim SortProperty As String
Dim Descending As Object

instance.Sort(SortProperty, Descending)
[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.

Remarks

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.

See Also

Reference

_Table Interface

_Table Members

Microsoft.Office.Interop.Outlook Namespace

Other Resources

How to: Enumerate Items in the Inbox Based on the Last Modification Time