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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I reset form fields in MSWord without closing the form?

Status
Not open for further replies.

Carina1628

Technical User
Nov 12, 2002
16
US
I have a form that will be used several times a day. We don't need the data saved, we just print it out. How can I get the form fields to reset to blanks without closing and re-opening the form?

Thanks for any suggestions.
Carina
 
Are you familiar with VBA?

This can easily be done with VBA in the following manner:

[tt]
FormName.TextBox1.Value = ""
FormName.OptionButton1.Value = False
FormName.CheckBox1.Value = False
[/tt]

*cLFlaVA
----------------------------
A pirate walks into a bar with a huge ship's steering wheel down his pants.
The bartender asks, "Are you aware that you have a steering wheel down your pants?"
The pirate replies, "Arrrrr! It's driving me nuts!
 
cLFaVA appears to be making reference to userforms. Your questions may be about formfields.

Your post is unclear and can certainly be taken as if you are indeed talking about userforms. If you are, then cLFaVa gave the correct response.

However, if you are actually talking about formfields, then:

Textbox formfields
ActiveDocument.FormFields("formfieldname").Result = ""

CheckBox formfields
ActiveDocument.FormFields("formfieldname").Result = False

DropDown formfields
ActiveDocument.FormFields("formfieldname").DropDown.ListEntries(1).Name


Gerry
 
cLFaVA appears to be making reference to userforms. Your questions may be about formfields.

Your post is unclear and can certainly be taken as if you are indeed talking about userforms. If you are, then cLFaVa gave the correct response.

If you are talking about formfields, then:

Textbox formfields
ActiveDocument.FormFields("formfieldname").Result = ""

CheckBox formfields
ActiveDocument.FormFields("formfieldname").Result = False

DropDown formfields
ActiveDocument.FormFields("formfieldname").DropDown.ListEntries(1).Name



Gerry
 

fumei-
Good point. Thanks for clarifying.

*cLFlaVA
----------------------------
A pirate walks into a bar with a huge ship's steering wheel down his pants.
The bartender asks, "Are you aware that you have a steering wheel down your pants?"
The pirate replies, "Arrrrr! It's driving me nuts!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top