View Single Post
 
Old 10-18-2020, 06:38 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,105
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The code I posted works for the selected table, whether or not the table is at the start of the document. If you want it to work for all tables in the main story range then
Code:
Dim oTable As Table
Dim oRng As Range
Dim i As Integer
    For i = ActiveDocument.Tables.Count To 1 Step -1
        Set oTable = ActiveDocument.Tables(i)
        Set oRng = oTable.Range
        oRng.Collapse 1
        oRng.Select
        Selection.SplitTable
        Set oRng = oTable.Range
        oRng.Collapse 0
        oRng.InsertParagraphAfter
        DoEvents
    Next i
    Set oTable = Nothing
    Set oRng = Nothing
If you have an example of tables it doesn't work with, post the document so we can evaluate the problem.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote