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]...
 
Back
Top