ShowHeaderFooterOnFirstPage Property

Microsoft Publisher Visual Basic

ShowHeaderFooterOnFirstPage Property

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 fiollowing example adds a new section starting on the second page of the activedocument, 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