Table of contents
Collapse the table of content
Expand the table of content

Section.ShowHeaderFooterOnFirstPage Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

True if the header and footer of the specified section will be visible. Read/write Boolean.


expression. ShowHeaderFooterOnFirstPage

_expression_A variable that represents a Section object.

Return Value



The following example adds a new section starting on the second page of the active document, adds header and footer text to the master page, and then sets the ShowHeaderFooterOnFirstPage property to True.

Dim objSection As Section 
Set objSection = ActiveDocument.Sections.Add(StartPageIndex:=2) 
With ActiveDocument.Pages(2).Master 
 .Header.TextRange.Text = "Page " &; .PageNumber &; " header." 
 .Footer.TextRange.Text = "Page " &; .PageNumber &; " footer." 
End With 
objSection.ShowHeaderFooterOnFirstPage = True
© 2018 Microsoft