![]() |
#19
|
||||
|
||||
![]()
You can choose whether to have the check box unchecked when you run the macro.e.g.
Code:
Sub ClearForm() Dim oCC As ContentControl If ActiveDocument.ProtectionType <> wdNoProtection Then ActiveDocument.Unprotect End If For Each oCC In ActiveDocument.ContentControls On Error Resume Next oCC.Range.Editors.Item(1).Delete On Error GoTo 0 Select Case oCC.Type Case Is = wdContentControlDropdownList oCC.Type = wdContentControlText oCC.Range.Text = "" oCC.Type = wdContentControlDropdownList Case Is = wdContentControlCheckBox oCC.Checked = False Case Else oCC.Range.Text = "" End Select oCC.Range.Editors.Add (wdEditorEveryone) Next oCC ActiveDocument.Protect wdAllowOnlyReading End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
button "clear format", etc; anchors, functions and properties of OpenType, negative width of symbol? | tvan | Other Software | 1 | 07-18-2018 03:55 PM |
Using outlook form to enforce field to be filled in | megatronixs | Outlook | 1 | 01-21-2015 01:11 PM |
Text form filled shading | Barbara | Word | 2 | 04-25-2013 05:21 AM |
![]() |
Dave L | Word | 9 | 03-21-2012 07:04 PM |
How can create a form in Word 2007 that can be automatically filled? | artistech | Word | 0 | 08-04-2010 01:05 PM |