Microsoft Word Suite
139
Class: list entry
Plural
list entries
Represents an item in a drop-down form field. The list entries list includes all the items in a drop-
down form field.
Use list entry index, where index is the list entry name or the index number, to return a single list
entry object. The index number represents the position of the entry in the drop-down form field (the
first item is index number 1). The following example deletes the "Blue" entry from the drop-down
form field named "Color."
delete list entry "Blue" of drop down of form field "Color" of ¬
active
document
The following example displays the first item in the drop-down form field named "Color."
display dialog name of list entry 1 of drop down of form field "Color" ¬
of active document as string
To add an item to a drop-down form field, use the make command. The following example inserts a
drop-down form field and then adds "red," "blue," and "green" to the form field.
set myField to make new form field at active document with properties ¬
{text object:text object of selection, ¬
form field type:field form drop down}
make new list entry at drop down of myField with properties {name:"Red"}
make new list entry at drop down of myField with properties {name:"Blue"}
make new list entry at drop down of myField with properties {name:"Green"}
Properties
entry index
Returns a number that indicates the position of the list entry in the list entries list. Read-only.
name
Returns or sets the name of the drop-down form field item. Read/write.
Class: list format
Plural
list formats
Represents the list formatting attributes that can be applied to the paragraphs in a range.
To return the list format object for a text range, use the list format property. The following example
applies the default bulleted list format to the selection.
apply bullet default list format of text object of selection