Does anyone know how I can use VBA to protect multiple sections on a Word doc to allow only form fields. I have several sections in a template that I do not want changed. Other sections are meant to be changed. I currently have these in different sections in the template. I have protected these using the "tools --> Protect document" menu option. I then select protect document for "Forms". Word then gives me a list of sections that I can check or uncheck to have protected. I have written a process in VBA that will allow the user to update certain pieces of the protected sections. I am using
ActiveDocument.Unprotect Password:="password"
to unprotect the document. This works great. But when I want to reprotect the document I can't list every section. I seem to either get the whole document protected
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, Password:="password"
or only one section
ActiveDocument.Sections(3).Protect Type:=wdAllowOnlyFormFields, Password:="password"
does anyone know how I can protect several sections at once.
Thank you in advance,
BAKEMAN![[pimp] [pimp] [pimp]](/data/assets/smilies/pimp.gif)
ActiveDocument.Unprotect Password:="password"
to unprotect the document. This works great. But when I want to reprotect the document I can't list every section. I seem to either get the whole document protected
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, Password:="password"
or only one section
ActiveDocument.Sections(3).Protect Type:=wdAllowOnlyFormFields, Password:="password"
does anyone know how I can protect several sections at once.
Thank you in advance,
BAKEMAN
![[pimp] [pimp] [pimp]](/data/assets/smilies/pimp.gif)