I initially wanted this code to prompt for the addition of a new row in a table. What the easiest way to change the code where it only prompts in one specific table and not every table in my word document.
Do I need to name the specific table somehow first?
Thanks for the help!
PHP Code:
Private Sub Document_ContentControlOnEnter(ByVal ContentControl As ContentControl)
With Selection.Range
If .Information(wdWithInTable) Then
If .Cells(1).RowIndex = .Tables(1).Range.Cells _
(.Tables(1).Range.Cells.Count).RowIndex Then
If .Cells(1).ColumnIndex = .Tables(1).Range.Cells _
(.Tables(1).Range.Cells.Count).ColumnIndex Then
If MsgBox(" Do you want to add a new row to the table?", _
vbQuestion + vbYesNo, "Question") = vbYes Then
InsertRowWithContent
End If
Set p_oTargetRow = Selection.Rows(1)
End If
End If
End If
End With
End Sub