NextHeaderFooter Method

Applies To

View object.

Description

If the selection is in a header, this method moves to the next header within the current section (for example, from an odd header to an even header) or to the first header in the following section. If the selection is in a footer, this method moves to the next footer.

Note If the selection is in the last header or footer in the last section of the document, or if it's not in a header or footer at all, an error occurs.

Syntax

expression.NextHeaderFooter

expression Required. An expression that returns a View object.

See Also

Next property, PreviousHeaderFooter method, SplitSpecial property.

Example

This example displays the first page header in the active document and then switches to the next header. The document needs to be at least two pages long.

ActiveDocument.PageSetup.DifferentFirstPageHeaderFooter = True
With ActiveWindow.View
    .Type = wdPageView
    .SeekView =wdSeekFirstPageHeader
    .NextHeaderFooter
End With