This example cuts the first word in the first paragraph and pastes the word at the end of the
cut object word 1 of paragraph 1 of text object of active document
collapse range text object of paragraph 1 of active document direction ¬
move end of range text object of paragraph 1 of active document by ¬
a character item count -1
paste object text object of selection
This example cuts the contents of the selection and pastes them into a new document.
if selection type of selection is selection normal then
cut object text object of selection
set newDoc to make new document
paste object text object of newDoc
Expands the specified range or selection. Returns a new text range.
expand text range Required. An expression that returns a text range object.
[by enumeration] Optional. The unit by which to expand the range. Can be one of the following:
a character item, a word item, a sentence item, a paragraph item, a line item, a story item, a
screen, a section, a column, a row, a window, a cell, a character formatting, a paragraph
formatting, a table, or a item unit. The default value is a word item.
This example creates a range that refers to the first word in the active document, and then it
expands the range to reference the first paragraph in the document.
set myRange to word 1 of active document
set myRange to expand myRange by a paragraph item
Command: get border
Returns the specified border object.
get border text range/section/paragraph/font/Word style Required. The object to get the border
[which border enumeration] Optional. The border to be retrieved. Can be one of the following:
border top, border left, border bottom, border right, border horizontal, border vertical,
border diagonal down, or border diagonal up.