See https://www.msofficeforums.com/word-...age-table.html
Please crosspost correctly
Sub SortTable() 'Set the table object = the table with the selection On Error GoTo Err_Handler: For Each m_Otbl In ActiveDocument.Tables 'Table must be uniform (not split or merged cells) If Not m_Otbl.Uniform Then MsgBox "The selected table has split or merge cells and cannot be sorted with this procedure", vbInformation + vbOKOnly, "Non-Uniform Table" Exit Sub End If TableSort_Re_Sort Next m_Otbl Exit Sub Err_Handler: End Sub




Reply With Quote