how to protect certain zones of a word document using vba

F

frank

Hello:

Anybody knows the way to protect certain zones of a word document using vba?

Thanks in advance.

Frank.
 
J

Jonathan West

frank said:
Hello:

Anybody knows the way to protect certain zones of a word document using vba?

Thanks in advance.

What you can do in this respect varies greatly depending on whether you have
Word 2003 or an earlier version. Which version do you have?
 
J

Jonathan West

frank said:
I use Word 2003.
Thanks.
Frank.

Take a look at the last part of this article. It deals with document
protection in Word 2003. It will introduce you to the Document Protection
Task Pane which is what you use for this. The Task pane allows you to set
certain parts of the docuemntas uneditable, and allows you tor estrict the
styles which can be used in the editable areas.

Creating Custom Toolbars for Templates
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=262
 
F

Fletcher James

One important thing to know, if you're writing macros, is that once you
protect a section (protect for forms) then, as far as I can see, the user
can no longer select portions of that section, except for the contents of
forms fields. In addition, the Selection can no longer be placed in the
protected areas -- or, if it is, then you can no longer access information
such as Selection.Text.

If anyone knows otherwise, (or knows another way of preventing user
modifications) please enlighten me, as it would save me a lot of work on my
current project.!!

--
Fletcher James
President
Levit & James, Inc.

(703)771-1549
MailTo:[email protected]
http://www.levitjames.com
 
J

Jonathan West

Fletcher James said:
One important thing to know, if you're writing macros, is that once you
protect a section (protect for forms) then, as far as I can see, the user
can no longer select portions of that section, except for the contents of
forms fields. In addition, the Selection can no longer be placed in the
protected areas -- or, if it is, then you can no longer access information
such as Selection.Text.

If anyone knows otherwise, (or knows another way of preventing user
modifications) please enlighten me, as it would save me a lot of work on my
current project.!!

If you (as the macro writer) know the password used for protecting the
document, you can unprotect the relevant bits, do whatever processign you
need to do, and then protect them again.
 

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