
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. Word Object Model Reference Support and feedback Footers(wdHeaderFooterPrimary).PageNumbers.Add _ The following example adds page numbers to the first page footer in the first section in the active document. Use the Add method with the PageNumbers object to add a page number to a header or footer.

If the OddAndEvenPagesHeaderFooter property is True, you can return an odd header or footer by using wdHeaderFooterPrimary, and you can return an even header or footer by using wdHeaderFooterEvenPages. Making a different first page header/footer with Docs is easy After inserting a header or footer in your document you’ll see a checkbox as shown below: Just tick the box and you’ll be able to set a different header and footer on the first page. Use the OddAndEvenPagesHeaderFooter property with the PageSetup object to specify different odd and even page headers and footers. Make a title page without headers or footers. Sections(1).Footers(wdHeaderFooterFirstPage) _ PageSetup.DifferentFirstPageHeaderFooter = True The following example inserts text into the first page footer in the active document. Use the DifferentFirstPageHeaderFooter property with the PageSetup object to specify a different first page. You can also return a single HeaderFooter object by using the HeaderFooter property with a Selection object. Footers(wdHeaderFooterPrimary).Range.Text = "Footer text" Headers(wdHeaderFooterPrimary).Range.Text = "Header text"

The following example changes the text of both the primary header and the primary footer the first section of the active document. Use Headers (Index) or Footers (Index), where index is one of the WdHeaderFooterIndex constants ( wdHeaderFooterEvenPages, wdHeaderFooterFirstPage, or wdHeaderFooterPrimary), to return a single HeaderFooter object. Click on the top of a page where you want to start a new header or footer which is different to the original one (here I click on the top of the page 2), click Layout > Breaks > Next Page. Please do as follows to create different headers or footers in a Word document. You cannot add HeaderFooter objects to the HeadersFooters collection. Create multiple headers or footers in Word.
