Share via


ShowHeaderFooterOnFirstPage Property [Publisher 2003 VBA Language Reference]

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

expression.ShowHeaderFooterOnFirstPage()

expression Required. An expression that returns a Section object.

Example

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

Applies to | Section Object