Microsoft Word Suite
126
You can also return a single header footer object by using the header footer object property with a
selection object.
Note You cannot add header footer objects to the header footers list.
Remarks
To specify a different first page, use the different first page header footer property with the page setup
object. The following example inserts text into the first page footer in the active document.
set different first page header footer of page setup of active document ¬
to
true
insert text "Written by Joe Smith" at text object of (get footer section 1 ¬
of active document index header footer first page)
To specify different odd and even page headers and footers, use the odd and even pages header footer
property with the page setup object. If the odd and even pages header footer property is true, you can
return an odd header or footer by using header footer primary, and you can return an even header
or footer by using header footer even pages.
To add a page number to a header or footer, use the make command with the page numbers object.
The following example adds page numbers to the primary footer in the first section of the active
document.
make new page number at (get footer section 1 of active document index ¬
header
footer
primary)
Properties
header footer index
Represents the specified header or footer in the document or section. Read-only.
Can be one of the following:
·
header footer primary
·
header footer first page
·
header footer even pages
is header
True if the specified header footer object is a header. Read-only.
link to previous
True if the specified header or footer is linked to the corresponding header or footer in the
previous section. When a header or footer is linked, its contents are the same as in the previous
header or footer. Read/write.
Because the link to previous property is set to true unless you change it, you can add headers,
footers, and page numbers to your entire document by working with the headers, footers, and
page numbers in the first section.
The link to previous property applies to each header or footer individually. For example, the link
to previous property could be set to true for the even-numbered-page header but false for the
even-numbered-page footer.