I have some fields in my document and I would like people not to modify them. I tried to use the Locked property, but the fields value can still be edited. Does someone knows how to do this? Thanks
Fields: you can insert them by choosing "insert" > "fields...". You have got a lot of predefined categories but you can also choose "DocVariables", that you can define.
You can define them in VBA:
ActiveDocument.Variables("myVariable")
There is also the property:
ActiveDocument.Variables("myVariable").locked
but this property won't prevent the user to be able to modify the field in the document.
You can lock a Field, not a Variable, and it probably does the opposite of what you want anyway; it doesn't protect against editing, it stops the document being updated from the variable not the other way round.
If you want to protect part of your document, protection, not locking, is what you need. Word 2003 allows you to protect parts of a document.
Enjoy,
Tony
------------------------------------------------------------------------------------ We want to help you; help us to do it by reading this:Before you ask a question.
On the Tools > Protect Document Task Pane, check the "Allow only this type of editing" check box in Section 2. Leave the dropdown at the default "No changes". Select the parts of the document you want unprotected and check "Everyone" under "Exceptions" (which will have appeared).
Enjoy,
Tony
------------------------------------------------------------------------------------ We want to help you; help us to do it by reading this:Before you ask a question.
Yes, Gerry, new in 2003, and you can make different exceptions for different users although I'm not sure how it defines or recognises the different users). The interface is a Task Pane instead of a dialogue and sits there beside your document so you can switch protection on and off and change aspects of it while you work. All in all, an improvement.
Enjoy,
Tony
------------------------------------------------------------------------------------ We want to help you; help us to do it by reading this:Before you ask a question.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.