[Solved] Word 2016- How to add/delete Repeating Section Content Control in VBA


To delete repeating item section for specifically named RSCC just edit the code you found in the other question.

Set cc = ActiveDocument.SelectContentControlsByTitle("RepCC").Item(1)
'to delete the first RepeatingSectionItem
cc.RepeatingSectionItems.Item(1).Delete
'to delete all but the first RepeatingSectionItem
Dim index As Long
For index = cc.RepeatingSectionItems.Count To 2 Step -1
  cc.RepeatingSectionItems.Item(index).Delete
Next index
'to delete the entire ContentControl
cc.Delete

13

solved Word 2016- How to add/delete Repeating Section Content Control in VBA