Making certain parts of the document protected

O

ofireps

Hello,

Is there any way in Word (2003/2007) to protect certain parts (lines of
text) of a document, so that the user will not be able to edit them?
I am building a template file with special code-tags, and I don't want the
user to be able to change those tags, just the text between them.

How can I achieve that?

Thanks,
Ofir.
 
J

Jay Freedman

ofireps said:
Hello,

Is there any way in Word (2003/2007) to protect certain parts (lines
of text) of a document, so that the user will not be able to edit
them?
I am building a template file with special code-tags, and I don't
want the user to be able to change those tags, just the text between
them.

How can I achieve that?

Thanks,
Ofir.

In the Protect Document pane (or in Word 2007, the Restrict Formatting and
Editing pane, which is the same thing), check the box for editing
restrictions and set the dropdown to "No changes (Read only)".

Select everything from the start of the document up to the start of the
first tag you want protected. In the Exceptions section, check the box next
to "Everyone". Now, select from the end of the protected tag up to the
beginning of the next protected tag, and again check "Everyone". Repeat this
until you have entered exceptions for all of the areas that should be
editable.

Finally, click the Start Enforcing Protection button and, optionally, enter
a password.

This won't work for anyone with a Word version earlier than 2003; those
users would find that the entire document is protected.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
O

ofireps

Thanks a lot!

Is there a way this could be done programmatically? In my application, I
create rtf files with these tags, and there could be a few dozens of fields,
so protecting them manually isn't a nice job.. Can I protect them
programmatically?

Thanks again,
Ofir.
 
J

Jay Freedman

As far as I can tell, this variety of protection isn't exposed to VBA.
It's possible that something could be done with Visual Studio Tools
for Office, but I'm not familiar with that.
 

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