As written, the code checks whether it is exiting the last content control in the table. The number of content controls in that row is of no consequence. Indeed, the code was tested against tables having every possible kind of content control in a given row - including multiples of the same kind.
That said, it was not envisaged that the code would be run against a table having multiple content controls in the same cell. That could be accomodated by changing:
Code:
'Get our ContentControl's index # in the table
j = ActiveDocument.Range(.Range.Tables(1).Range.Start, .Range.End).ContentControls.Count
to:
Code:
'Get our ContentControl's index # in the table
j = ActiveDocument.Range(.Range.Tables(1).Range.Start, .Range.Cells(1).Range.Start).ContentControls.Count
j = j + ActiveDocument.Range(.Range.Cells(1).Range.Start, .Range.End).ContentControls.Count