Microsoft Word Suite
282
Example
This example inserts a Microsoft Excel spreadsheet named "Data.xls" after the selection. The style
value (191) is a combination of the numbers 1, 2, 4, 8, 16, 32, and 128.
collapse range text object of selection direction collapse end
insert database at text object of selection format table format simple2 ¬
style 191 data source "Macintosh HD:Users:Shared:Data.xls" ¬
without link to source
Command: insert date time
Inserts the current date or time, or both, either as text or as a TIME field.
Syntax
insert date time
at text range Required. An expression that returns a text range.
[date time format Unicode text] Optional. The format to be used for displaying the date or time,
or both.
[insert as field Boolean] Optional. True to insert the specified information as a TIME field. The
default value is true.
Example
This example inserts a TIME field for the current date. A possible result might be "November 18,
1996."
insert date time at text object of selection date time format "MMMM dd, yyyy" ¬
with insert as field
This example inserts the current date at the end of the active document. A possible result might be
"01/12/97."
collapse range text object of active document direction collapse end
insert date time at text object of active document ¬
date time format "MM/dd/yy" without insert as field
This example inserts a TIME field for the current date in the footer for the active document.
insert date time at text object of (get footer section 1 of active document ¬
index header footer primary) date time format "MMMM dd, yyyy" ¬
with insert as field