View Single Post
 
Old 10-17-2020, 12:44 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
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 following will work as requested
Code:
Dim oTable As Table
Dim oRng As Range
    If Selection.Information(wdWithInTable) = True Then
        Set oTable = Selection.Tables(1)
        Set oRng = oTable.Range
        oRng.Collapse 1
        oRng.Select
        Selection.SplitTable
        Set oRng = oTable.Range
        oRng.Collapse 0
        oRng.InsertParagraphAfter
    Else
        MsgBox "Selection is not in a table", vbCritical
    End If
    Set oTable = Nothing
    Set oRng = Nothing
__________________
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