I've created a form in Word 2010 that contains Rich Text, Drop Down, and Date controls. I've created a macro button on the Quick Access Toolbar that is supposed to clear all the fields. I found on this forum a thread that I thought would do this but the programming code does not seem to be working. Note: Through the developer I have restricted the user to only be able to change the form fields. Here is the macro code.
Dim fld As FormField
For Each fld In ActiveDocument.FormFields
If fld.Type = wdFieldFormTextInput Then
fld.Result = ""
ElseIf fld.Type = wdFieldFormCheckBox Then
fld.CheckBox.Value = False
ElseIf fld.Type = wdFieldFormDropDown Then
fld.DropDown.Value = 1
End If
Next
Can anyone tell me what I need to do to make this macro work. Thanks
Dim fld As FormField
For Each fld In ActiveDocument.FormFields
If fld.Type = wdFieldFormTextInput Then
fld.Result = ""
ElseIf fld.Type = wdFieldFormCheckBox Then
fld.CheckBox.Value = False
ElseIf fld.Type = wdFieldFormDropDown Then
fld.DropDown.Value = 1
End If
Next
Can anyone tell me what I need to do to make this macro work. Thanks