
Note: If you adjust the margins for the page, the header/footer text alignment also adjusts to suit.
Now go to page three - this is a portrait page, and the header text has readjusted back to suit that orientation. Now check what’s happened on page two - the text you just typed and the tabs you inserted using this method have automatically adjusted for the dimensions of the landscape page. The text you just typed automatically goes to the right position in the header. On the Alignment Tab window, select Right then click OK. Look what happens - the text you just typed automatically goes to the center position in the header! On the Alignment Tab window, select Center then click OK. Footers(wdHeaderFooterPrimary).Range.Text 'Footer text' End With You can also return a single HeaderFooter object by using the HeaderFooter property with a Selection object. At the end of the text you just typed, click Insert Alignment Tab again. Headers(wdHeaderFooterPrimary).Range.Text 'Header text'. Type some text in the header at the cursor position (e.g. On the Alignment Tab window, select Left then click OK. On the Header & Footer Tools > Design tab, click Insert Alignment Tab. Go back to page one and double-click in the header area to open the header/footer area. Place your cursor anywhere in page two prior to the section break, then make change this section to landscape orientation ( Page Layout tab > Orientation > Landscape).
You should now have three blank pages in your test document. For information about returning a single member of a collection, see Returning an object from a collection. expression A variable that represents a Section object. Click the Header or Footer button on the Insert tab.
Press Enter a couple more times, then insert another Next Page section break. Returns a HeadersFooters collection that represents the headers for the specified section. Once youve added a header or footer, you can easily remove it if you find that it isnt what you want. Insert a ‘Next Page’ section break ( Page Layout tab > Breaks > Next Page). Press Enter a couple of times to add some empty paragraphs.
Here’s how to set up a test document to show you how it works it works the same for headers and footers - I only describe it for headers in these steps: Well, you don’t have to anymore! It seems this ‘new’ feature has been around since Word 2007, but I must have missed it. The workaround that many people used to control the placement was borderless tables in the headers/footers combined with ‘AutoFit to Window’. One of the annoyances with earlier versions of Word was what happened to left-, centre-, and right-aligned text in headers and footers when you inserted a landscape section. I didn’t know you could do this!! Not until I read this article, anyway.