Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Deleting All Headers and Footers.

Deleting All Headers and Footers

Written by Allen Wyatt (last updated June 12, 2021)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365


1

If you work with documents you receive from other people, one of the tasks you may routinely need to do is delete all the headers and footers in the documents. One way to do this is to simply select the various headers and footers and delete them, but if the document contains many sections, doing so can be very time consuming. (Particularly if you consider that each section can have up to three different headers and footers.)

Repetitious, time-consuming tasks are always a prime candidate for macros; this is no exception. The following macro will zip right through each section of a document, deleting all the headers and footers that have been defined.

Sub RemoveHeadAndFoot()
    Dim oSec As Section
    Dim oHead As HeaderFooter
    Dim oFoot As HeaderFooter

    For Each oSec In ActiveDocument.Sections
        For Each oHead In oSec.Headers
            If oHead.Exists Then oHead.Range.Delete
        Next oHead

        For Each oFoot In oSec.Footers
            If oFoot.Exists Then oFoot.Range.Delete
        Next oFoot
    Next oSec
End Sub

This macro is very powerful—it doesn't ask if you want to proceed, nor does it consider what may be included in the headers and footers. It simply deletes them all, leaving your document with none. If you regularly process quite a few documents, you can easily assign the macro to the Quick Access Toolbar or a shortcut key.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10221) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. You can find a version of this tip for the older menu interface of Word here: Deleting All Headers and Footers.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Inserting the Current Month

Need to add the name of the current month to your document? Word includes a field that can make the addition easy, and it ...

Discover More

Shortcut for Viewing Formulas

If you need to switch between viewing formulas and viewing the results of those formulas, you'll love the keyboard ...

Discover More

Quickly Dumping Array Contents

Variable arrays are used quite often in macros. If you use an array once in your macro and then need to reuse it for ...

Discover More

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!

More WordTips (ribbon)

Suppressing Headers or Footers

Don't want a header or footer to appear on just a portion of your document? It's easy to do when you understand that ...

Discover More

Deleting a Header or Footer

When working with existing documents, you may need to delete a header or footer previously created. Here's how you can do ...

Discover More

Preventing the Left Margin of a Footer from Moving

When you print a document, does the position of the page footer seem to move left and right? This could have to do with ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 + 5?

2021-11-06 09:12:05

Clive

Thanks.
I have Word 2013 and access to Word Professional 2019.
I am using word files which has over 200 sections. There are multiple files
It is cumbersome to go and delete each section Header & footer.
The code given by you remove header and footer content but the section frames remain.
How to remove all section frames? Pl suggest.

I have tried :
1. Goto Insert - Header/Footer and remover Header/Footer. But it works for each section. - Too cumbersome if I have over 200 sections.
2. I tried editing header & footer but again it works per section only.
3. I tried Inspection option also. But it corrupts the Header & footers but frames remains.

Now Please suggest any other method to remove all section Header & footers.


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.