Microsoft Word Suite
248
Example
This example attempts to activate the main document associated with the active data source
document. If the main document isn't open, the Open dialog box is displayed, with a message in the
status bar.
try
edit main document data merge of document "data.doc"
on error
set status bar to "Main document is not open"
show (get dialog dialog file open)
end try
Command: edit type
Sets options for the specified text form field.
Syntax
edit type text input Required. An expression that returns a text input object.
form field type enumeration Required. The text box type. Can be one of the following:
calculation text, current date text, current time text, date text, number text, or regular text.
[default type Unicode text] Optional. The default text that appears in the text box.
[type format Unicode text] Optional. The formatting string used to format the text, number, or
date (for example, 0.00, Title Case, or M/d/yy). For more examples of formats, see the list
of formats for the specified text form field type in the Text Form Field Options dialog box.
Example
This example adds a text form field named "Date" at the beginning of the active document. The edit
type command is used to set the type to date text and set the date format to "M/d/yy."
set ffield to make new form field at active document with properties ¬
{text object:(create range active document start 0 end 0), form ¬
field type:field form text input}
set name of ffield to "Date"
edit type (text input of ffield) form field type date text ¬
type format "M/d/yy"