Use different headers and footers for left and right pages: If your document uses facing pages and you want to enter different information on left and right pages, select the “Left and right pages are different” checkbox. To format headers and footers, do any of the following: In this case, click in the toolbar and choose Page Number. Note: If you already added a page number on another page, you don’t see the Insert Page Number pop-up menu. Try putting text in the header and the page number in the footer, for example, to avoid cutting off the text. However, if there is text or a page number already in one of the fields, the original field limits apply. If the text in your header or footer is too long to fit in a field, the field adjusts to allow for the longer text. If a button is dimmed, that format can’t be applied to the selected text. To change the font, font size, color, and alignment of header and footer text, select the text, then use the controls in the Format sidebar. Left and right pages are different: When this checkbox is selected in a document using facing pages, the headers and footers on left and right pages can be different. Deselect this checkbox if you want to use different headers and footers for this section. Match previous section: Use the same headers and footers from one section to the next.
If the document has more than one section, the setting applies only to the first page of this section. Hide on first page of section: Hide the header or footer on the first page. To set header or footer behavior for each section, click the Section tab at the top of the Document sidebar, then choose any of the following: To set the distance from the top and bottom page margins, click in the toolbar, click the Document tab at the top of the sidebar, then click the arrows or enter values in the Top and Bottom fields (below the Header and Footer checkboxes). Instead, click in the toolbar and choose Page Number. Note: If you already added page numbers in another section, you don’t see the Insert Page Number pop-up menu. If you can’t remove something from a document.Restore an earlier version of a document.Save a large document as a package file.Export to Word, PDF, or another file format.Change the look of chart text and labels.Add a legend, gridlines, and other markings.Change a chart from one type to another.Functions that accept conditions and wildcards as arguments.Ways to use the string operator and wildcards.String operator and wildcards in formulas.Calculate values using data in table cells.Select tables, cells, rows, and columns.Fill shapes and text boxes with color or an image.Set pagination and line and page breaks.Format hyphens, dashes, and quotation marks.Format Chinese, Japanese, or Korean text.Use a keyboard shortcut to apply a text style.Create, rename, or delete a paragraph style.Bold, italic, underline, and strikethrough.Select text and place the insertion point.View formatting symbols and layout guides.Intro to images, charts, and other objects.Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback. Range.InsertBefore "Section 1 Even Header" Range.InsertBefore "Section 1 Odd Header" Range.InsertBefore "Section 2 Even Header" Range.InsertBefore "Section 2 Odd Header" PageSetup.OddAndEvenPagesHeaderFooter = True Paragraphs(5).Range.InsertBreak Type:=wdSectionBreakNextPage The second part creates unique headers for even-numbered and odd-numbered pages in sections one and two in the new document.
The first part of this example creates a new document with two sections. For example, the LinkToPrevious property could be set to True for the even-numbered-page header but False for the even-numbered-page footer. The LinkToPrevious property applies to each header or footer individually. Headers(wdHeaderFooterPrimary).PageNumbers.Add For instance, the following example adds page numbers to the header on all pages in all sections of the active document. Because the LinkToPrevious property is set to True by default, you can add headers, footers, and page numbers to your entire document by working with the headers, footers, and page numbers in the first section. When a header or footer is linked, its contents are the same as in the previous header or footer. SyntaxĮxpression An expression that returns a ' HeaderFooter' object. True if the specified header or footer is linked to the corresponding header or footer in the previous section.