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

Adding a Drop Shadow to a Text Box

Drop shadows add a nice touch to text boxes, making it seem like they are hovering above the page. Here's the simple steps ...

Discover More

Removing Leading Spaces in a Table

If you work with data imported from the Web or with documents prepared by others, you may have tables that have leading ...

Discover More

Changing an Existing Style

Excel allows you to create styles that define how your data looks. At some point you may want to change a style you ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (ribbon)

Placing the First Two Words from the Following Page In the Footer

Headers and footers can be used for all sorts of information to help orient your document reader. In fact, Word provides many ...

Discover More

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 headers ...

Discover More

Pulling Headers and Footers from Other Files

You may have some standard headers and footers you want to make available in your document templates. This tip describes some ...

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 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 7 - 1?

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.