protect_unprotect word form for specific sections

  • Thread starter Thread starter Lenny
  • Start date Start date
L

Lenny

I have a password protected form w/fields that I need to unprotect to allow a
macro to run. Initially - I need to unprotect the entire document, but then
re-lock specific sections. Programatically, how can this be accomplished?
Please demonstrate.

Best regards
Lenny
 
Generally, for each section, you can decide if it should be protected or
not, by setting the ProtectedForForms property. For example:

ActiveDocument.Sections(1).ProtectedForForms = False ' Not protected
ActiveDocument.Sections(2).ProtectedForForms = True ' Protected
'add more sections if desired...

(Of course, this simple example assumes that the document has at least two
sections.)

--
Stefan Blom
Microsoft Word MVP


in message
news:[email protected]...
 

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

Back
Top