![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#2
|
|||
|
|||
|
Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oCtl As Object
Dim oCC As ContentControl
On Error Resume Next
For Each oCtl In ActiveDocument.InlineShapes
If oCtl.OLEFormat.ProgID = "Forms.OptionButton.1" Then
oCtl.OLEFormat.Object.Value = False
End If
Next oCtl
For Each oCC In ActiveDocument.Range.ContentControls
Select Case oCC.Type
Case Is = wdContentControlDropdownList
oCC.Type = 1
oCC.Range.Text = vbNullString
oCC.Type = wdContentControlDropdownList
Case Is = wdContentControlComboBox
oCC.Type = 1
oCC.Range.Text = vbNullString
oCC.Type = wdContentControlComboBox
Case Else
oCC.Range.Text = vbNullString
End Select
Next oCC
lbl_Exit:
Exit Sub
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Content Controls - Dependent Dropdown
|
someazguy | Word VBA | 14 | 02-05-2023 08:01 PM |
Clear Button For Specific Content Control
|
shaun0406 | Word VBA | 6 | 06-14-2021 10:55 AM |
Content Controls - Dependent Dropdown & Text
|
Mightymegs | Word VBA | 6 | 05-18-2020 05:34 AM |
| Clear Values from All Controls on Form | ScottyBee | Word VBA | 2 | 04-02-2019 09:55 AM |
Add new row to protected form including content controls via Command Button
|
tbrookes | Word VBA | 5 | 06-20-2016 02:48 AM |