如果为 True,则指定的 HeaderFooter 对象是页眉。Boolean 类型,只读。
expression.IsHeader
expression 必需。该表达式返回一个 HeaderFooter 对象。
本示例将选定页脚并添加页码。
With ActiveDocument.ActiveWindow.ActivePane.View
.Type = wdPrintView
.SeekView = wdSeekCurrentPageHeader
End With
If Selection.HeaderFooter.IsHeader = True Then
ActiveDocument.ActiveWindow.ActivePane.View _
.SeekView = wdSeekCurrentPageFooter
End If
Selection.HeaderFooter.PageNumbers.Add