Try this version
Code:
Sub ResetCCs()
Dim aCC As ContentControl, iType As Integer
For Each aCC In ActiveDocument.ContentControls
With aCC
Select Case .Type
Case wdContentControlText, wdContentControlRichText, wdContentControlDate
.Range.Text = ""
Case wdContentControlComboBox, wdContentControlDropdownList
.DropdownListEntries(1).Select
Case wdContentControlCheckBox
.Checked = False
Case wdContentControlBuildingBlockGallery
iType = .Type
.Type = wdContentControlRichText
.Range.Text = ""
Do While .Range.Tables.Count > 0
.Range.Tables(1).Delete
Loop
.Type = iType
End Select
End With
Next aCC
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Last edited by Guessed; 04-13-2022 at 11:30 PM.
Reason: Amended to deal with tables in Building Block CCs
|