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
Note:
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, 2013, 2016, 2019, and Word in Office 365.
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!
Like to have your page numbers displayed using different types of numbers? Here's how you can choose from the several ...
Discover MoreHeaders and footers can add a final, professional touch to your printed document. Here's the quick way to add the headers ...
Discover MoreWant the margins used in your footers (or headers) to be wider than the margins used in the rest of your document? There ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
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
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.
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.
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2021 Sharon Parq Associates, Inc.
Comments