Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reset button in a ms word 2000 form

Status
Not open for further replies.

adamhutton

IS-IT--Management
Nov 12, 2002
20
0
0
US
I'm using ms word 2000 and have a form created. Is it possible to create a button on the page that will reset all the fields on the page?

This button would need to not print out.


Thanks a ton,

Adam
 
Are they formfields (i.e. text formfields, check formfields etc)? If they are, you could make a macrobutton on the page that would go through all the formfields and reset the results.

This makes all check boxes unchecked, and all text boxes empty.

Sub ResetFields()
Dim myField As FormField
For Each myField In ActiveDocument.FormFields
If myField.Type = wdFieldFormCheckBox Then _
myField.CheckBox.Value = False
If myField.Type = wdFieldFormTextInput Then _
myField.Result = ""
Next
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top