Automate different headers and footers for landscape vs. portrait pages in Microsoft Word

Solution 1:

I don't know of a macro-free way to define a global "landscape" and a global "portrait" header & footer and have them automatically be applied to all pages. That sounds like trying to define a page's font size based on its margins.

What you can do is divide your page into sections and format those. It sounds like you've already started down this path. I think the missing piece you're looking for is Link to Previous. When unchecked, this option allows you to assign a different header & footer to a given section. You can then assign an orientation to the section and both properties will stay in sync within that section.

That last bit is important. Synchronization won't occur across sections. Use this technique only if:

  • The number of landscape & portrait sections in your document is small and doesn't change often. (An often-changing number of pages within a section is okay.)

Don't use this technique if:

  • The number of landscape & portrait sections in your document is large or changes often.
  • Your headers & footers change often. (Although this may not be a problem if the number of sections is small.)
  • Maintainers of your document aren't comfortable working with sections.

Steps

  1. Start with a blank document.
  2. In the Home tab's Paragraph group, show formatting marks by checking Show/Hide ¶.
  3. Divide your document into sections by inserting several Next Page section breaks1:

    1. Page Layout > Breaks > Next Page.
    2. Repeat several times.
  4. Orient each section as desired:

    1. Navigate the insertion point (blinking cursor) to a desired section.
    2. Page Layout > Page Setup dialog box launcher > Margins:

      1. Orientation: Landscape.
      2. Apply to: This section.
      3. OK.
    3. Repeat for all desired sections.
  5. For each section's header & footer, uncheck Link to Previous2:

    1. Navigate the insertion point (blinking cursor) to the document's second section (the first section has no previous section to link to).
    2. Right click in the section's header area and select Edit Header.
    3. The Design tab (part of the Header & Footer Tools) should appear. In its Navigation group, uncheck Link to Previous.
    4. Repeat for the footer (Go to Footer will help in this regard).
    5. Repeat for all sections (Next and Previous will help in this regard).
  6. For each section's header & footer, fill in the desired text:

    1. Right click in the section's header area and select Edit Header.
    2. Type the desired text.
    3. Repeat for the footer.
    4. Repeat for all sections.

Once your document is set up this way, each section will have its own orientation, header, and footer, and will automatically apply those properties to all pages within it, even as those properties change.

Try it!

  1. Navigate the insertion point (blinking cursor) to any section.
  2. Insert a new page:

    1. Page Layout > Breaks > Page3.
    2. Insert a hard return (newline) by pressing Enter.
  3. Note that the new page inherits its section's header & footer, and that any change made to the header or footer is applied to all other pages within that section.

1. You can later change these section breaks to be Continuous, Even Page, or Odd Page, but this initial setup will be far easier using whole pages.

2. There are also macros you can write to uncheck Link to Previous by default.

3. To insert a new page within a section, insert a new page break, not a Next Page section break.