


Set objDoc = Documents.Open(FileName:=strFolder & strFile)īut remember to arrange all documents in the same folder before anything else. StrFile = Dir(strFolder & "*.docx", vbNormal) StrFolder = "C:\Users\Public\Documents\New folder\Test2\" Selection.InsertBreak Type:=wdSectionBreakContinuousĪctiveDocument.Sections(1).ProtectedForForms = TrueĪctiveDocument.Protect wdAllowOnlyFormFieldsīy the way, in case you need to batch process multi-document, paste this macro instead: Sub ProtectHeaderAndFooterInMultiDoc()ĭim strFile As String, strFolder As String Double click the module to bring out the coding area and paste the following macro there:.Select “Module” on the menu to insert anew one under “Normal” project.Then click “Normal” project and then “Insert” tab.Press “Alt+ F11” to open VBA editor first.Method 2: Restrict the Editing of Header and Footer via VBA Finally, enter and reenter password then click “OK”.īy far, when you click on the header or footer area, you won’t be able to enter it.Then click “Yes, Start Enforcing Protection”.In that box, check only “Section 1” box and click “OK”.

Next click “Select sections” to invoke the “Section Protection” dialog box.Check the “Allow only this type of editing in the document” box and select “Filling in forms” option.Next click “Review” tab then the “Restrict Editing” command to open the “Restrict Formatting and Editing” Pane on the right side of the screen.

Now if you reveal all hidden marks, you shall see a continuous section break has been inserted.
