Microsoft Word Suite
286
This example inserts a formula field that's subtracted from a value represented by the bookmark
named "GrossSales." The result is formatted with a dollar sign.
collapse range text object of selection direction collapse start
insert formula selection formula "=GrossSales-45,000.00" ¬
number
format
"$#,##0.00"
Command: insert paragraph
Replaces the specified range or selection with a new paragraph.
Note After this method has been used, the text range is the new paragraph.
Syntax
insert paragraph
at text range Required. An expression that returns a text range object.
Remarks
If you don't want to replace the text range, use the collapse range command before using this
command.
Example
This example inserts a new paragraph at the beginning of the active document.
set myRange to create range active document start 0 end 0
insert paragraph at myRange
insert text "Dear Sirs, " at myRange
This example collapses the selection and then inserts a paragraph mark at the insertion point.
collapse range text object of selection direction collapse start
insert paragraph at text object of selection
collapse range text object of selection direction collapse end
Command: insert rows
Inserts the specified number of new rows above or below the row that contains the selection. If the
selection isnt in a table, an error occurs.
Note You can also insert rows by using the make command with the row class.
Syntax
insert rows selection Required. An expression that returns a selection object.
[position enumeration] Optional. Specifies whether to insert the new rows above or below the
selection. Can be one of the following: above or below.
[number of rows integer] Optional. The number of rows to be added.