The following code works to clear all rich text and reset all drop down CCs
in the entire document
How can I apply this only to the CCs nested in table(4)
?
Dim oCC As ContentControl
Dim oCCs As ContentControls
Set oCCs = ActiveDocument.ContentControls
For Each oCC In oCCs
With oCC
If oCC.Type = wdContentControlText Then
.Range.Text = ""
ElseIf oCC.Type = wdContentControlDropdownList Then
.Type = wdContentControlText
.Range.Text = ""
.Type = wdContentControlDropdownList
End If
End With
Next
Change:
Set oCCs = ActiveDocument.ContentControls
To:
Set oCCs = ActiveDocument.Tables(4).Range.ContentControls