Microsoft Word Suite
280
reference kind enumeration Required. The information to be included in the crossreference.
Can be one of the following: reference content text, reference endnote number, reference
endnote number formatted, reference entire caption, reference footnote number, reference
footnote number formatted, reference number full context, reference number no context,
reference number relative text, reference only caption text, reference only label and number,
reference page number, or reference position.
reference item Unicode text Required. If reference type is reference type bookmark, this
argument specifies a bookmark name. For all other reference type values, this argument
specifies the item number or name in the Reference type box in the Crossreference dialog
box. To return a list of item names that can be used with this argument, use the
get cross
reference items
command.
[insert as hyperlink Boolean] Optional. True to insert the crossreference as a hyperlink to the
referenced item.
[include position Boolean] Optional. True to insert above or below, depending on the
location of the reference item in relation to the crossreference.
Example
This example inserts at the beginning of the active document a cross-reference to the page that
includes the first bookmark in the document.
set myRange to create range active document start 0 end 0
set myBookmarks to (get cross reference items active document reference type ¬
reference type bookmark)
set content of myRange to "Page "
set myRange to move end of range myRange by a word item count 1
collapse range myRange direction collapse end
insert cross reference at myRange reference type reference type bookmark ¬
reference kind reference page number reference item ¬
item 1 of myBookmarks
Command: insert database
Retrieves data from a data source (for example, a separate Word document) and inserts the data as a
table in place of the specified range.
Syntax
insert database
at text range Required. An expression that returns a text range object.
[format enumeration] Optional. A format listed in the Formats box in the Table AutoFormat
dialog box (Table menu).