Share via


SortAscending Method

Sorts paragraphs or table rows in ascending alphanumeric order. The first paragraph or table row is considered a header record and isn't included in the sort. Use the Sort method to include the header record in a sort.

Note  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.

expression**.SortAscending**

expression Required. An expression that returns a Range, Selection, or Table object.

Example

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

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

Applies to | Range Object | Selection Object | Table Object

See Also | Sort Method | SortDescending Method