For example:
Code:
'The following code conditionally adds a new row, with content controls, to the designated tables.
Dim i As Long, j As Long, t As Long, Prot As Variant
Const Pwd As String = "" 'Insert password (if any) here
With CCtrl
'Check that the Content Control is within our table.
t = ActiveDocument.Range(0, CCtrl.Range.Start).Tables.Count
Select Case t
Case 3, 4
Case Else: Exit Sub
End Select
'Get the number of ContentControls in the table