PreviousHeaderFooter Method
Applies To
View object.
Description
If the selection is in a header, this method moves to the previous header within the current section (for example, from an even header to an odd header) or to the last header in the previous section. If the selection is in a footer, this method moves to the previous footer.
Note If the selection is in the first header or footer in the first section of the document, or if it's not in a header or footer at all, an error occurs.
Syntax
expression.PreviousHeaderFooter
expression Required. An expression that returns a View object.
See Also
NextHeaderFooter method, SplitSpecial property.
Example
This example inserts an even section break, switches the active window to page layout view, displays the current header, and then switches to the previous header.
Selection.Collapse Direction:=wdCollapseStart
Selection.InsertBreak Type:=wdSectionBreakEvenPage
With ActiveWindow.View
.Type = wdPageView
.SeekView = wdSeekCurrentPageHeader
.PreviousHeaderFooter
End With