Microsoft Word Suite
127
page number options
Returns a
page number options
object that represents options for the page number fields
included in the specified header or footer. Read-only.
text object
Returns a text range object that represents the portion of a document that's contained in the
header footer object. Read-only.
Class: heading style
Plural
heading styles
Represents a style used to build a table of contents or figures.
Use heading style index, where index is the index number, to return a single heading style object.
The index number represents the position of the style in the heading styles list. The following
example adds (at the beginning of the active document) a table of figures built from the Title style,
and then displays the name of the first style in the heading styles list.
set myTOF to make new table of figures at active document with properties ¬
{text object:create range active document start 0 end 0, ¬
use heading styles:true}
make new heading style at myTOF with properties {style:style title, level:2}
display dialog (style of heading style 1 of myTOF) as string
To add a style to the heading styles list, use the make command. The following example adds a
table of contents at the beginning of the active document and then adds the Title style to the list of
styles used to build a table of contents.
set myTOC to make new table of contents at active document with properties ¬
{text object:create range active document start 0 end 0, ¬
use heading styles:true, lower heading level:3, upper heading level:1}
make new heading style at myTOC with properties {style:"Title", level:2}
Properties
level
Returns or sets the level for the heading style in a table of contents or table of figures.
Read/write.
style
Returns or sets the style for the specified object. To set this property, specify either the local
name of the style, an integer, a built-in Word style, or an object that represents the style.
Read/write.