Here's a script I just created that works similar to the Word version except that it creates the envelope as a new document instead of appending it to the beginning of the existing document. Select the address in the Pages letter and it will be pasted into the envelope template. As written, the script uses my envelope template which is named _Envelope. You can substitute your own template, just replace the name in the script. It is essential, though, that you save the envelope template with the cursor at the insertion point for the address.
I suppose this could also be modified to work with an envelope document.
*
Copy the script in the clipboard
Paste it into a blank window of Script Editor
Save it as an application : envelope.app
Move the newly created application into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Pages:
Now, enter your Pages document.
Select the address to use.
Go to
menu Scripts >Envelope
--(SCRIPT]
tell application "Pages"
set add to selection
set the clipboard to add as text
make new document with properties {template name:("_Envelope")}
set addon to add as text
set the selection to addon
end tell
[/SCRIPT]
This happens to be my first published Applescript. I'm used to coding in VBA and this took a little more work than I would have liked. Perhaps more advanced scripters can make it a little more elegant.
Good luck,
Terry
Message was edited by: Terry Keelan1
Message was edited by: Terry Keelan1