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

Microsoft Word - Form fields

Status
Not open for further replies.

officework13

Technical User
Aug 29, 2002
37
CA
I have made a document with form fields and sent it to the client. They have responded. I have now realized that i would like to add some additional fields for them to respond to but every time i unlock then lock the fields i loose all the prior information that the client had entered. is there any way to do this without losing the information.

thanks.
 
I have some sort of a solution but it's quite involved ...

Try using document variables (DOCVARIABLE)
Yiu add them to a template/document, & assign a value
They'll keep this value unless they're updated

They need some VBA coding to add/update them
Use a form to update their value
Show their value in the document by using the word field {DOCVARIABLE}

example

Adding a DocVariable to a document:
ActiveDocument.Variables.Add "SurName"

Updating their value:
1. Create a form with enough text boxes to suit your purpose
2. Use this code to display their initial value in the textbox (form_load)
frmUserInput.txtSurName.Value = ActiveDocument.Variables("SurName").Value
3. use this code to update their value (commandbuttonOK_click)
ActiveDocument.Variables = ("SurName").ValuefrmUserInput.txtSurName.Value

Showing the variables' value to a document:
press <Shift-F9> & type the code DOCVARIABLE followed by the variable name between double quotes - resulting in{DOCVARIABLE &quot;SURNAME&quot;}
Press <F9> to update
Hope this helps
Cheers
Nikki
 
The fix is to protect the document in VB but I am not at home until Friday and can't remember the syntax

Try searching on Microsofts support site there is a fix there.

If you haven't had any joy by Friday e mail me and I will send you the fix from home

Cheers

Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top