Table.SortAscending method (Word)

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.

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

See also

Table Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.