Protecting a Section

R

Russ

LEU,
The main point, I was belaboring, was to have a protected document to begin
with and then unprotect the sections you want unprotected. Your code snippet
didn't show any attempt to protect the document first and I didn't catch
whether you had said that it was already protected; so I kept thinking that
was why you were having problems with it.

Put this snippet in your code to check if document is already protected or
not, before unprotecting sections. You can adjust the 'Type:=' part of this
snippet to whatever you need.

If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End If
 

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