Microsoft Word Suite
178
Properties
space after
Returns or sets the amount of spacing (in points) after the specified paragraph or text column.
Read/write.
width
Returns or sets the width (in points) of the specified object. Read/write.
Class: text input
Plural
text inputs
Represents a single text form field.
Use form field index, where index is either the bookmark name associated with the text form field or
the index number, to return a form field object. To return a text input object, use the text input
property with the form field object. The following example deletes the contents of the text form
field named "Text1" in the active document.
clear text input of form field "Text1" of active document
The index number represents the position of the form field in the form fields list. The following
example checks the type of the first form field in the active document. If the form field is a text form
field, the example sets "Mission Critical" as the value of the field.
if type of form field 1 of active document is field form text input then
set form field result of form field 1 of active document ¬
to
"Mission
Critical"
end if
The following example determines whether the
ffield
variable represents a valid text form field in
the active document before it sets the default text.
set ffield to text input of form field 1 of active document
if valid of ffield is true then
set default text input of ffield to "Type your name here"
else
display dialog "The first field is not a text box"
end if
To add a text form field, use the make command with the form field object. The following example
adds a text form field at the beginning of the active document and then sets the name of the form
field to "FirstName."
set ffield to make new form field at active document with properties ¬
{text object:set range text object of active document start 0 ¬
end 0, form field type:field form text input}
set name of ffield to "FirstName"