Selection.HeaderFooter property (Word)
Returns a HeaderFooter object for the specified selection. Read-only.
Syntax
expression. HeaderFooter
expression A variable that represents a Selection object.
Remarks
An error occurs if the selection isn't located within a header or footer.
Example
This example adds a centered page number to the current page footer.
With ActiveDocument.ActiveWindow.View
.Type = wdPrintView
.SeekView = wdSeekCurrentPageFooter
End With
Selection.HeaderFooter.PageNumbers.Add _
PageNumberAlignment:=wdAlignPageNumberCenter
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk