View Full Version : HELP- Userforms and Templates

06-10-2005, 05:03 AM

I have designed some templates with VBA expresses help over the last few months. On testing I have found a problem, my templates are very unforgiving.

Once a user has filled out the dialog box and submitted it, the data gets assigned to the appropriate bookmark. However if the user has made a typo they can't correct the document as it is protected. I would like the doc to be protected but not the text that has been summitted via the userform. Is there any way to assign a userform textbox to a 'text form field'?

What I mean is that the text typed into the userform will be placed into a text form field instead of a bookmark therefore allowing the user to correct any mistakes in document.

Any help would be much appreaciated.

Thank you

06-10-2005, 02:28 PM
Hi, :yes

For a Formfield textbox use something like this in the Ok button of the UserForm:

ActiveDocument.Formfields("Textbox1").Result = Me.Textbox1.Text
Enjoy! :whistle:

06-14-2005, 08:05 AM
Hi newk. Is this working for you. If so, please mark the thread as solved.

As Joost suggested, if you have a text formfield in the document you can take the information from the UserForm and put it into the formfield. The user can edit it as much as they need to, while still keeping the rest of the document protected and NOT editable.

06-14-2005, 10:08 AM
I agree this is indeed the power of Formfields! write to them easily without having to unprotect/protect the document. :thumb

I hope Newk has found what he was looking for...