Unprotect sections in a word document using VBA
I have a word document template which is protected and want to unprotect some of the individual sections in the document so that the text can be edited. I found an old post on VBA express by Greg Maxey that almost does what I want but it is for unprotecting the sections to allow Form Field data entry.
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oFld As FormField
ActiveDocument.Unprotect
ActiveDocument.Protect wdAllowOnlyReading
For Each oFld In ActiveDocument.Sections(2).Range.FormFields
oFld.Range.Editors.Add wdEditorEveryone
Next
lbl_Exit:
Exit Sub
End Sub
How would I adapt this to work for text in the sections as this is not a form so does not use form fields.
Any help would be greatly appreciated.
|