Form Fields in versions 2000 and 2002

A

Adam Mann

Hello. I am using form fields (particularly the text form field) to fill in sections of a very large document. Word 2000 will blank text form fields if I unprotect and then choose to protect again. However, I have found that MS addressed this issue in Word 2002 by creating another button aptly named "Reset Form Fields" on the forms toolbar and leaving edited form field text in fields by default.

I have to use Word 2000 to complete this document and was wondering if anyone has a workaround for this issue in Word 2000? I have found that I can copy my edited text into the default field for the text form field under the text form field's properties, but that workaround can be very time consuming for 200 separate text form fields. I want to thank the kind soul(s) out there in advance for any help!
 
G

Greg Maxey

Adam,

I use the two macros copied below and then replaced the
padlock icon on the forms toolbar with my two of my own
icons. One icon fires the unprotect macro and the other
fires the protect macro.

Sub Unprotect()
On Error GoTo Ignore
MsgBox "The form is not protected."
ActiveDocument.Unprotect
Ignore: Err.Clear
End Sub

Sub Protect()
On Error GoTo Ignore
MsgBox "The form is now protected."
ActiveDocument.Protect Type:=wdAllowOnlyFormFields,
NoReset:=True
Ignore: Err.Clear
End Sub

See:
http://www.mvps.org/word/FAQs/MacrosVBA/CreateAMacro.htm
and
http://www.mvps.org/word/FAQs/Customization/AsgnCmdOrMacroT
oToolbar.htm
-----Original Message-----
Hello. I am using form fields (particularly the text form
field) to fill in sections of a very large document. Word
2000 will blank text form fields if I unprotect and then
choose to protect again. However, I have found that MS
addressed this issue in Word 2002 by creating another
button aptly named "Reset Form Fields" on the forms
toolbar and leaving edited form field text in fields by
default.
I have to use Word 2000 to complete this document and was
wondering if anyone has a workaround for this issue in
Word 2000? I have found that I can copy my edited text
into the default field for the text form field under the
text form field's properties, but that workaround can be
very time consuming for 200 separate text form fields. I
want to thank the kind soul(s) out there in advance for
any help!
 
A

Adam Mann

Greg

Thank you for the assistance. I followed your instructions and the helpful links but am getting a compile error for the unprotect subroutine. It reads "Compile Error: Expected named parameter" in the Visual Basic Editor for the line reading

ActiveDocument.Protect Type:=wdAllowOnlyFormFields

I have set up buttons for both macros and the Protect macro works well plus I get the Dialog box confirming that it worked. I would really appreciate your further assistance with the issue or any other recommendations from other users.
 
G

Greg Maxey

Adam,

Try pulling the next line of code up after the comma. I am at home now
(that macro runs at work), but I think the line of code should be continous
on one line and include the "NoReset:=True" It was probably broken by text
wrapping when I posted.

--
Greg Maxey
A peer in "peer to peer" support
Rockledge, FL
E-mail for additional help, within reason, if you like. I may not
always solve your problem, but no charge if I do. To e-mail, first edit
out the "w...spam" in the displayed address.
 
A

Adam Mann

Greg

That worked out great and has provided exactly the function that I needed. Thank you very much and also thanks for introducing me to www.mvps.org. I will be sure to visit frequently in the future.
 
G

Greg Maxey

Adam,

Glad you are satisfied and an all up round. Thanks for the feedback.

--
Greg Maxey
A peer in "peer to peer" support
Rockledge, FL
E-mail for additional help, within reason, if you like. I may not
always solve your problem, but no charge if I do. To e-mail, first edit
out the "w...spam" in the displayed address.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top