![]() |
|
#2
|
||||
|
||||
|
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 |
| Tags |
| command button, macro, word 16 |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Change Value of a Content Control based on the value of another content Control
|
jsc_msoffice | Word VBA | 2 | 05-21-2021 09:51 PM |
Content Control Dropdowns - How to duplicate the content control and allow a second choice
|
ashleyf | Word VBA | 2 | 03-19-2020 09:11 AM |
Repeating part of a Content Control
|
NicB | Word | 9 | 07-29-2018 09:46 AM |
| Adding Row with Content control using Command Button | baes10 | Word VBA | 0 | 12-13-2017 11:30 AM |
Deleting a table from a content control -- preserving the content control
|
BrainSlugs83 | Word Tables | 8 | 11-14-2013 03:06 AM |