![]() |
|
#2
|
||||
|
||||
|
Greg's code operates on the selected table. Change it to sequentially process all the tables e.g.
Code:
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
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Page No 1 changes when subsequent Page No formatted as continuous | brigb | Word | 3 | 06-28-2023 12:35 PM |
Menu Macro Not Executing - Need Help
|
Moondoggy | Excel | 4 | 01-14-2023 12:49 AM |
Table Header - have 'continued' on subsequent pages...
|
User12344321 | Word Tables | 6 | 07-27-2020 12:45 PM |
| Executing a Word macro only after a certain date & time | rdross51 | Word VBA | 4 | 07-07-2017 06:29 AM |
Shift Excel Cell after executing a macro for second time
|
LearningMacro | Excel Programming | 2 | 01-08-2015 03:05 PM |