Microsoft Word Suite
309
Example
This example copies the paragraph and character formatting from the first paragraph in the active
document to the next paragraph in the active document.
select text object of paragraph 1 of active document
copy format selection
select text object of (next paragraph paragraph 1 of active document)
paste format selection
This example collapses the selection and copies the character formatting to the next word.
collapse range text object of selection direction collapse start
copy format selection
select (next range text object of selection by a word item count 1)
paste format selection
Command: paste object
Inserts the contents of the Clipboard at the specified text range. If you don't want to replace the
contents of the text range, use the collapse range command before using this command.
Syntax
paste object selection object Required. An expression that returns a selection object (the location
where you want to paste the object).
Example
This example copies and pastes the first table in the active document into a new document.
if (count of tables in active document) 1 then
select table 1 of active document
copy object selection
set newDoc to make new document
paste object text object of newDoc
end if
This example copies the first paragraph in the document and pastes it at the insertion point.
copy object text object of paragraph 1 of active document
collapse range text object of selection direction collapse start
paste object text object of selection
This example copies the selection and pastes it at the end of the document.
if selection type of selection is not selection ip then
copy object selection
set range2 to text object of active document
set range2 to collapse range range2 direction collapse end
paste object range2
end if