View Single Post
 
Old 06-20-2021, 02:35 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Try this - it does nothing to some of the CC types such as Repeating CCs
Code:
Sub ResetCCs()
  Dim aCC As ContentControl
  For Each aCC In ActiveDocument.ContentControls
    Select Case aCC.Type
      Case wdContentControlComboBox, wdContentControlDate, wdContentControlRichText, wdContentControlText
        aCC.Range.Text = ""
      Case wdContentControlDropdownList
        aCC.Type = wdContentControlText
        aCC.Range.Text = ""
        aCC.Type = wdContentControlDropdownList
    End Select
  Next aCC
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia

Last edited by Guessed; 06-20-2021 at 06:09 PM. Reason: Fixed code error on Select Case line
Reply With Quote