Function fcnParentTable(Optional lngNestLevel As Long = 0) As Table Dim oTbl As Table Dim lngNest As Long Dim oRng As Range 'Pass 1 to return patriarch table, Pass 0 to return immediate parent. 'Pass numbers greater than 1 to return ancestors other than patriarch of deep nested tables. On Error Resume Next Set oTbl = Selection.Tables(1) oTbl.Select On Error GoTo 0 If Not oTbl Is Nothing Then With oTbl lngNest = .NestingLevel Set oRng = .Range.Cells(.Range.Cells.Count).Range oRng.Collapse wdCollapseEnd End With If lngNestLevel = 0 Then If lngNest > 1 Then lngNestLevel = lngNest - 1 Else lngNestLevel = 1 End If End If Do While lngNest > lngNestLevel Do oRng.Move Unit:=wdCharacter, Count:=1 Loop While oRng.InRange(oTbl.Range) Set oTbl = oRng.Tables(1) lngNest = oRng.Tables(1).NestingLevel Loop If lngNestLevel <= lngNest Then Set fcnParentTable = oRng.Tables(1) End If End If Set oTbl = Nothing Set oRng = Nothing lbl_Exit: Exit Function End Function