PDA

View Full Version : Solved: Need Urgent Help Please



gibbo1715
11-22-2005, 12:32 PM
I was planning on using the code below to prevent my users from editing part of my form when it has been completed

For Each aField In ActiveDocument.Sections(1).Range.FormFields()
aField.Enabled = False
Next

My probloem is when I change the enabled property to false to prevent my users changing that part of my document it removes all the text from the form field

How can i make it so the text is retained??

Thanks

Gibbo

gibbo1715
11-22-2005, 12:58 PM
Ok managed to sort this

It seems word likes to remove data from form field when protecting (Very annoying)

need to set the noreset to true as foolows

Gibbo

ActiveDocument.Protect Password:="test", noreset:=True, Type:=wdAllowOnlyFormFields

fumei
11-22-2005, 09:46 PM
Dpending on your requirements, you may want to reconsider using formfields. Formfields are designed for user input. True you can enable them, or not, but basically they are designed for user input.

If your requirement is to take a single input and no more, why not use a Userform?

gibbo1715
11-23-2005, 02:41 AM
Gerry

Ordinarily I would agree with you but for this project this was the best way forward for me really.

Thanks for taking the time to look though

is appreciated

gibbo