2 Ways to Restrict the Editing of Header and Footer in Your Word Document

In this article, we would like to introduce you 2 ways to restrict the editing of header and footer in your Word document.

As we know, header and footer of a document should keep its integrity so as to make the formatting professional. Thus, it would be nice to develop ways to prevent header or footer from either intentional or accidental modification. As usual, here are 2 methods we suggest.

Method 1: Restrict the Editing of Header and Footer Manually

  1. To begin with, press “Ctrl+ Home” to go to the head of the document.
  2. Next, click “Page Layout” tab.
  3. Then click “Breaks” in “Page Setup” group.
  4. And choose “Continuous” on the drop-down menu. Click "Page Layout"->Click "Breaks"->Choose "Continuous"

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

  1. Next click “Review” tab then the “Restrict Editing” command to open the “Restrict Formatting and Editing” Pane on the right side of the screen.Click "Review"->Click "Restrict Editing"
  2. Check the “Allow only this type of editing in the document” box and select “Filling in forms” option.
  3. Next click “Select sections” to invoke the “Section Protection” dialog box.
  4. In that box, check only “Section 1” box and click “OK”.
  5. Then click “Yes, Start Enforcing Protection”.Check "Allow only this type of editing in the document" Box->Select "Filling in forms"->Click "Select sections"->Check "Section 1" Box->Click "OK"->Click "Yes, Start Enforcing Protection"
  6. Finally, enter and reenter password then click “OK”.Enter and reenter password->Click "OK"

By far, when you click on the header or footer area, you won’t be able to enter it.

Method 2: Restrict the Editing of Header and Footer via VBA

  1. Press “Alt+ F11” to open VBA editor first.
  2. Then click “Normal” project and then “Insert” tab.
  3. Select “Module” on the menu to insert anew one under “Normal” project.Click "Normal"->Click "Insert"->Click "Module"
  4. Double click the module to bring out the coding area and paste the following macro there:
Sub ProtectHeaderAndFooter()
  Selection.HomeKey Unit:=wdStory
 
  Selection.InsertBreak Type:=wdSectionBreakContinuous
  ActiveDocument.Sections(1).ProtectedForForms = True
 
  ActiveDocument.Protect wdAllowOnlyFormFields
End Sub

By the way, in case you need to batch process multi-document, paste this macro instead:

Sub ProtectHeaderAndFooterInMultiDoc()
  Dim objDoc As Document
  Dim strFile As String, strFolder As String
 
  '  Initialization
  strFolder = "C:\Users\Public\Documents\New folder\Test2\"
  strFile = Dir(strFolder & "*.docx", vbNormal)
 
  '  Precess each document in the folder.
  While strFile <> ""
    Set objDoc = Documents.Open(FileName:=strFolder & strFile)
 
    Selection.HomeKey Unit:=wdStory
 
    Selection.InsertBreak Type:=wdSectionBreakContinuous
    ActiveDocument.Sections(1).ProtectedForForms = True
 
    ActiveDocument.Protect wdAllowOnlyFormFields
 
    objDoc.Save
    objDoc.Close
    strFile = Dir()
  Wend
End Sub

But remember to arrange all documents in the same folder before anything else. And replace the “C:\Users\Public\Documents\New folder\Test2\” with your actual folder path.

  1. Lastly, click “Run”.Paste codes->Click "Run"

With the employ of macro way, there is no need to input password to protect header and footer.

Cope with Document Issues

Word documents, like all other type of files, are easy victim of software corruption. Therefore, to secure your valuable documents and prevent them from inaccessible forever, you can take the kelp of a docx fix tool.

Author Introduction:

Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including Excel corruption and pdf repair software products. For more information visit www.datanumen.com

Leave a Reply

Your email address will not be published. Required fields are marked *