I'm a total novice when it comes to VBA. I found the following code on another forum and copied it in order to program a command button to reset form fields on a Word document that is protected. The text boxes and drop downs are resetting properly but the checkboxes are not becoming unchecked while protection is on. However, if I stop protection and click the command button, the check boxes become unchecked. How can I get this to work when the document is protected?
Private Sub CommandButton1_Click()
Dim oFF As FormField
For Each oFF In ActiveDocument.Range.FormFields
Select Case oFF.Type
Case Is = wdFieldFormTextInput
oFF.Result = ""
Case Is = wdFieldFormDropDown
oFF.DropDown.Value = 1
Case Is = wdFieldFormCheckBox
oFF.Result = False
End Select
Next oFF
End Sub