11

Is it possible to have different headers and footers for a landscape and portrait page in one document, thus when you add a landscape page it needs to automatically use the landscape header and footer? And if I press enter on the landscape page it should create a new landscape page with its own header and footer...

We've looked into section breaks, and adding Even/Odd page breaks, but then one needs to add a new header manually…

Or is there another way to set up a document to make it issue to switch between headers and footers for different pages?

I'm using MS Word 2013.

fixer1234
  • 27,064
  • 61
  • 75
  • 116
Camerone Andre
  • 111
  • 1
  • 3
  • Please specify what version of Word / Office you are using. It is however possible, in newer versions, if you select formatting "after this page" or something like this. I warn you that it gets a lot messy. Since I don't have a recent Word I can't answer, but I'll look into this. – Doktoro Reichard Aug 21 '13 at 05:07
  • We are using MS Word 2013 – Camerone Andre Aug 21 '13 at 05:14
  • Since I'm using Word 2003, it doesn't have the ability to give different headers and footings to pages. I know 2007 can, so newer versions should. AFAIK, it is "impossible" to make something like what you are asking (by this I mean Word automatically knowing if a page is landscape/portrait and then add header). You **can** do this, by hand, but it gets unbelievably messy. The quote marks on impossible mean that it might be possible if someone somewhere programs a macro for that. But it seems IMHO like a feature few people would use. – Doktoro Reichard Aug 21 '13 at 05:17
  • Ok I see. We are currently using section breaks for changing the page orientation, but for the headers and footers we found that if we use section breaks, every time we press enter on for instance the landscape page it adds a portrait page with its own header and footer instead of another landscape page, it adds an Odd/Even page break, so then we have to in any case change the header and footer manually, which is not quite what we want – Camerone Andre Aug 21 '13 at 05:20
  • Maybe the best solution is to divide your work (the relevant parts) into different files, then formatting there. But like I said, Word and this kind of formatting is messy, no matter what. Wait for some other answers, at least. – Doktoro Reichard Aug 21 '13 at 05:31
  • What do you mean by "dividing my work into different files", do you mean having more than one document? – Camerone Andre Aug 21 '13 at 06:18
  • Yes pretty much. You divide the pages that need special formatting to different files and after, format each file header and footing. If they have numbering attached to them, it is possible to change on a per-document base. So, you would divide (in the best case scenario) all landscape and all portrait pages and place them in two separate files, in each formatting. If **each** page needs a special header (worst case scenario), divide to a file per page. – Doktoro Reichard Aug 21 '13 at 06:59
  • 1
    You could insert a hidden field containing an if-statement in the header/footer checking the page orientation, eg: > If Selection.PageSetup.Orientation = wdOrientPortrait ... that way you don't have to worry about section breaks. – M.Bennett Aug 21 '13 at 07:26
  • This can be done via VBa, but not sure how well it will work! You would need to look at creating the page orientation on load (or after you click a button, you can choose what event it will be wired up to) (`ActiveSheet.PageSetup.Orientation = xlLandscape`) and then adding a [header/footer](http://www.cpearson.com/excel/headfoot.htm). You may need to stick it in an if else statement too, again, depending on how you create it. I don't have the time to write the code, sorry. – Dave Aug 21 '13 at 07:26
  • Ok that makes sense M.Bennett, so it would be a hidden field that I add to the header and footer section in a Word document... where do I find this hidden field in MS Word? – Camerone Andre Aug 21 '13 at 07:59

1 Answers1

2

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.

thinkterry
  • 121
  • 4