Microsoft Word Suite
102
The following example determines whether the form field represented by
ffield
is a valid
drop-down form field before adding an item to it.
set ffield to drop down of form field 1 of active document
if valid of ffield is true then
make new list entry at ffield with properties {name:"Hello"}
else
display dialog "The first field is not a drop down"
end if
To add a drop-down form field, use the make command with the form field class. The following
example adds a drop-down form field at the beginning of the active document and then adds items
to the form field.
set ffield to make new form field at the beginning of active document with ¬
properties {text object:(create range active document start 0 ¬
end 0), form field type:field form drop down}
set name of ffield to "Colors"
make new list entry at drop down of ffield with properties {name:"Blue"}
make new list entry at drop down of ffield with properties {name:"Green"}
make new list entry at drop down of ffield with properties {name:"Red"}
Properties
drop down default
Returns or sets the default drop-down item. The first item in a drop-down form field is 1, the
second item is 2, and so on. Read/write.
drop down value
Returns or sets the number of the selected item in a drop-down form field. Read/write.
valid
True if the specified form field object is a valid check box form field, drop down form field, or
text form field. False if it isn't valid. Read-only.
Class: endnote
Plural
endnotes
Represents an endnote. The endnotes list represents the endnotes in a selection, text range, or
document.