![]() |
#7
|
||||
|
||||
![]()
Alternatively:
Code:
Sub SplitTables() Application.ScreenUpdating = False Const StrFnd As String = "Tree Number" With ActiveDocument.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = StrFnd .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = True End With Do While .Find.Execute If .Information(wdWithInTable) = True Then With .Cells(1) If .RowIndex > 1 Then If Split(.Range.Text, vbCr)(0) = StrFnd Then .Range.InsertBreak (wdColumnBreak) End If End With End If .Collapse wdCollapseEnd Loop End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Finding Tables with Vertically Merged Cells | T-Belle | Word VBA | 10 | 07-19-2020 07:09 PM |
![]() |
jeffreybrown | Word VBA | 2 | 01-16-2019 03:23 PM |
VBA color of visible gridlines of tables word (with some merged cells in first rows) | Alvaro.passi | Word VBA | 0 | 07-18-2017 09:11 AM |
![]() |
rocky2 | Word VBA | 12 | 12-22-2016 03:03 AM |
Combining 2 tables into 1 and use Table2's column widths (hoping for workaround dealing merged cells | CodingGuruInTraining | Word VBA | 24 | 10-07-2015 07:48 PM |