SortAscending 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