Microsoft Word Suite
Command: activate object
Activates the specified object.
activate object document/window/pane Required. An expression that returns a document,
window, or pane object.
This example activates the document named "Sales".
activate object document "Sales"
This example activates the second window in the windows list.
activate object window 2
This example splits the active window and then activates the first pane.
set split vertical of active window to 50
activate object pane 1 of active window
Command: append to spike
Deletes the specified range and adds the contents of the range to the Spike (a built-in AutoText
entry). This command returns the Spike as an auto text entry object.
append to spike template Required. An expression that returns a template object.
range text range Required text range object. The range thats deleted and appended to the Spike.
This example deletes the selection and adds its contents to the Spike in the Normal template.
if (count of characters of text object of selection) > 1 then
append to spike normal template range text object of selection
This example clears the Spike and adds the first and third words in the active document to the Spike
in the attached template. The contents of the Spike are then inserted at the insertion point.
collapse range text object of selection direction collapse start
set myTemplate to attached template of active document
repeat with entry in (get auto text entries of myTemplate)
if name of entry is "Spike" then delete entry
append to spike myTemplate range word 1 of active document
append to spike myTemplate range word 2 of active document
insert auto text entry auto text entry "Spike" of myTemplate where ¬
text object of selection