• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Microsoft Excel Tips and Tricks - Computergaga

  • Home
  • Excel Online Courses
  • Excel Functions List
  • Free Downloads
  • Blog
  • Tutorials
  • About
Home / Office / Automatically Add the Chapter Heading into a Documents Header

Automatically Add the Chapter Heading into a Documents Header

If you are working on a long document you may want to display each chapter heading in the relevant header. For example, to display chapter 1 in the header for pages 2 – 15 and then chapter 2 for pages 16 – 21 and so on.

You may have previously thought that this technique would require inserting multiple section breaks and using the Link to Previous option you get with Headers and Footers. This is how most training sessions and online tutorials approach this.

However, Microsoft Word contains a fantastic feature that will enable you automatically insert each chapter heading into the relevant page header. This also means that the header can be updated when content is moved or changed. And all without a single section break.

To do this you need to insert the StyleRef field into the page header.

Insert the StyleRef Field

  1. Click the Insert tab on the Ribbon, Header and then Edit Header (Or double click in the top margin of a page)
  2. Position the cursor in the header where you would like the chapter heading to appear
  3. Click the Quick Parts button and choose Field
Insert a field to your documents header
  1. Scroll down the list of Field Names on the left and select StyleRef
  2. Select the required heading style such as Heading 1 from the Style Name list in the middle
Select the Heading StyleRef field from the list
  1. Click Ok

The chapter heading of that page will appear in the header. Check the other pages, the relevant chapter title should have appeared for each page.

Heading added to the header in Word

This brilliant feature accomplishes a very popular Word task without the need for section breaks.

Reader Interactions

Comments

  1. Beatrice Ekoko says

    19 May 2013 at 5:35 pm

    This is great but how do you do it on a MAC???
    Thanks,
    b

    Reply
    • computergaga_blog says

      20 May 2013 at 7:22 am

      Hi Beatrice,
      I’m afraid I am not too familiar with MAC’s but I know the Styleref field is available. I’m sure the steps will be similar.

      Reply
  2. Helle says

    1 December 2014 at 7:52 pm

    Hi,
    Thank you! Very helpful tutorial. Could you please tell me how to not include the header on the first page of the chapter? My solution so far is to insert a white box to hide the header … Guess there is a better solution to my problem.
    Thank you again!

    Reply
    • computergaga says

      2 December 2014 at 8:11 am

      Sounds you will need to insert additional section breaks after each chapter first page. Remove the same as previous link from these new sections. And then delete the header from the chapter first pages.
      White box would work but would not be automated if the document is edited in the future.

      Reply
  3. Bill Benson says

    24 February 2016 at 10:54 pm

    Hi,
    Thank you so much for these instructions. It worked great but is pushing the page number off the page (out of margins) for much of the doc (15 out of 27 chapters). I can manually delete the length of the chapter heading in the Header to see the pg #, but it would have to be done for all affected chapters and it doesn’t stick if the TOC is refreshed. Any help would be greatly appreciated.
    Thanks again,
    Bill

    Reply
  4. Ankita VYas says

    7 September 2016 at 1:07 pm

    Brilliant.
    To add Title to header, one does not need to Select StyleRef, rather Title to be Selected in the fields.
    Thank You

    Reply
    • computergaga says

      9 September 2016 at 8:55 pm

      When I tried this Title did not change for each chapter heading

      Reply

Leave a Reply Cancel reply

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

Primary Sidebar

Recent Posts

  • Excel SWITCH Function – Nested IF Function Alternative
  • Sum Formulas Only in Excel
  • How to Calculate Age in Excel
  • Custom Sort in Excel
  • Case Sensitive Lookup with XLOOKUP in Excel
Advanced Excel Success book

Footer

Contact

[email protected]

LinkedIn Twitter YouTube

Useful Links

  • Home
  • Excel Online Courses
  • Tutorials
  • Sitemap
  • Privacy Policy
  • Jobs by Jooble

Course Topics

  • Blog
  • Charts
  • Courses
  • Dashboards
  • Downloads
  • Excel Tips
  • Formulas
  • Mail Merge
  • Office
  • PivotTables
  • Power BI
  • Power Pivot
  • Power Query
  • VBA

Join Our Mailing List

© Copyright 2009 Computergaga · All Rights Reserved ·