Create customized Pages '09 letters from Address Book
May 19, '09 07:30:00AM • Contributed by: mkoistinen
May 19, '09 07:30:00AM • Contributed by: mkoistinen
I send a lot of letters written in Pages '09 from myself personally, as well as from my business. Pages already offers "merge fields" that allow you to setup placeholder text which can be populated by dragging and dropping in a contact from Address Book, but you have to pre-choose the type of address when you set these fields up.
Normally, I set up all my templates using a person's work address, but sometimes, I need to send a letter (business or personal) to a person's home address (or another address), and I'm back to copying and pasting the address from Address Book again.
I've decided to deal with this the other way around. By using the following AppleScript, I can now send a letter by clicking on a person's record in my Address Book, then clicking the address I wish to use. A contextual menu appears with 'Send personal letter' as an option. When I choose this, Pages will launch, create a new Personal Letter from my template, then put the person's details into the template, ready to go.
I've set-up multiples of these, one for each letter template that I'm likely to use, but even one is great!
To use this, you'll need to do three things:
I'd like to also automatically delete the placeholder text for fields that aren't in use (e.g. JobTitle, CompanyName, etc.), but so far, I haven't yet found an elegant solution for this.
[robg adds: I tested this one, and it works as described.]
Normally, I set up all my templates using a person's work address, but sometimes, I need to send a letter (business or personal) to a person's home address (or another address), and I'm back to copying and pasting the address from Address Book again.
I've decided to deal with this the other way around. By using the following AppleScript, I can now send a letter by clicking on a person's record in my Address Book, then clicking the address I wish to use. A contextual menu appears with 'Send personal letter' as an option. When I choose this, Pages will launch, create a new Personal Letter from my template, then put the person's details into the template, ready to go.
I've set-up multiples of these, one for each letter template that I'm likely to use, but even one is great!
To use this, you'll need to do three things:
- Make sure you have the path and filename set correctly in the script below to point to your Pages template.
- Save the below AppleScript as a Script (not an Application or Script Bundle, etc.) into your Library here: ~/Library » Address Book Plugins » Personal Letter.scpt.
- Edit your template so that the you have the following key words in the right places: FirstName LastName JobTitle CompanyName WorkStreet WorkCity WorkState WorkZip. For example, your template could begin Dear FirstName LastName,.... Note that you can also use these words as conventional merge fields in Pages to get the normal drag-and-drop behavior from Address Book, too, but it's not necessary for this hint (but still useful).
I'd like to also automatically delete the placeholder text for fields that aren't in use (e.g. JobTitle, CompanyName, etc.), but so far, I haven't yet found an elegant solution for this.
[robg adds: I tested this one, and it works as described.]
•
[8,109 views]
