Changing the Link to Previous Default for Headers and Footers

by Allen Wyatt
(last updated August 29, 2015)

6

Paul works as a technical writer and creates some documents that have an endless requirement to set new headers and footers for each document section. It is a pain to continually need to display the correct dialog box and clear the "link to previous" checkbox for both the headers and footers. Paul wonders if there is a way he can set the default to disassociate headers and footers when creating a section. He would prefer it to be the other way around, where he needs to explicitly set "link to previous" when he needs it.

There is no way to handle this with a setting in Word; it seems that the setting always returns to "link to previous." Instead you'll need to use a macro to accomplish a workaround for what you want. It is a relatively simple task to create a macro that creates a new section break and unlinks the headers and footers.

Sub AddNewSection()
    Selection.InsertBreak Type:=wdSectionBreakNextPage
    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    Selection.HeaderFooter.LinkToPrevious = False

    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
    Selection.HeaderFooter.LinkToPrevious = False
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub

The macro inserts a section break and then turns off the "link to previous" setting for the new section. You could easily add this macro to your Quick Access Toolbar or define a shortcut key to run it. The macro adds a "next page" section break; if you want a different type of section break, all you need to do is replace the wdSectionBreakNextPage with one of the other constants for sections breaks: wdSectionBreakContinuous (continuous section break), wdSectionBreakEvenPage (even-page section break), or wdSectionBreakOddPage (odd-page section break).

If you, instead, simply want to change all the "link to previous" settings for all the existing sections in your document, you can do so by using a different macro approach.

Sub UnlinkAllHeadersFooters()
    Dim s As Section
    On Error Resume Next

    For Each s In ActiveDocument.Sections
        s.Headers(wdHeaderFooterEvenPages).LinkToPrevious = False
        s.Headers(wdHeaderFooterFirstPage).LinkToPrevious = False
        s.Headers(wdHeaderFooterPrimary).LinkToPrevious = False
        s.Footers(wdHeaderFooterEvenPages).LinkToPrevious = False
        s.Footers(wdHeaderFooterFirstPage).LinkToPrevious = False
        s.Footers(wdHeaderFooterPrimary).LinkToPrevious = False
    Next s
End Sub

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13401) applies to Microsoft Word 2007, 2010, and 2013.

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

Adjusting the VLOOKUP Function

The VLOOKUP function is very powerful, but it will only return values that meet a very limited set of criteria. If you want ...

Discover More

Alphabetic Column Designation

Want to know the letters assigned by Excel to a particular column? Excel normally deals with column numbers, but you can ...

Discover More

Protecting Tracked Changes

Track Changes is a great tool for editors and collaborators to use when creating documents. An author, seeking changes from ...

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

More WordTips (ribbon)

Floating Footer

Need some specific text to appear just below the end of the text on the last page of your document? You can accomplish what ...

Discover More

Quickly Formatting Footers in Documents with Many Sections

Need to adjust all the footers or headers in a document that uses lots of them? It's easy to do if you understand how the ...

Discover More

Protecting Headers and Footers

If you don't want the information in a header or footer to be changed by users of your document, there are a couple of things ...

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}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 8Mpixels. 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 7 - 0?

2017-05-26 10:48:51

Susanne

Thanks Allen,
I\m already use this code which doesn't solve my problem because it's done after the fact. We build multi page documents that have different headers on every section. Every time I add a page or a section I have to adjust the links. If I'm not careful when i break the links i can lose and have lost headers on previous pages. Then depending on how your "different first page and different even/odd page settings are, headings not directly previous can be messed up. Basically it's a dogs breakfast and auto link to previous is not a good feature if you don't need it.


2017-05-25 02:41:32

Eugen Badila

This articol (Changing the Link to Previous Default for Headers and Footers) is very important but cannot solve the problem in which you have to insert a watermark (which is linked to only the header) and in some cases only the footer is linked to previous and not the header. How can be tested if only the header is not linked to the previous whilst the footer is linked?


2017-02-17 16:25:13

Susanne

This still allows for text from previous header and footer sections to appear in the new section even though they are not linked.
This means I now have delete the unwanted text.


2016-04-25 23:55:38

vasantha wijeyakulasuriya

Excellent coverage. Most useful. Great service.


2015-09-03 12:49:51

Paul

Thank-you for the advice on disassociation - will be of great use.

As for Brenda's problem, When you put in a section break, the page number of the new section will default to 1, but go into page numbering under headers and footers and click continue numbering from previous.

Hope I understood that OK.


2015-08-31 15:56:25

Brenda

I had a document that was created by someone else and it was set up with the link to previous throughout the document. I was not familiar with it but I had to make changes and every time I did it would reverse the changes. I was told to add a section break to get rid of the link to previous but the problem with that was the numbering of the pages. Every time you add a section break it causes another page so I could not get the numbering correct. How could I have fix this issue and continue numbering the document correctly.


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.

Newest Tips
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.