次の方法で共有


Table.SortAscending Method

Word Developer Reference

Sorts paragraphs or table rows in ascending alphanumeric order.

Syntax

expression.SortAscending

expression   Required. A variable that represents a Table object.

Remarks

The first table row is considered a header record and isn't included in the sort. Use the Sort method to include the first row in a sort. This method offers a simplified form of sorting intended for mail merge data sources that contain columns of data. For most sorting tasks, use the Sort method.

Example

This example sorts the table that contains the selection in ascending order.

Visual Basic for Applications
  If Selection.Information(wdWithInTable) = True Then
    Selection.Tables(1).SortAscending
Else
    MsgBox "The insertion point is not in a table."
End If

See Also