Single-click Envelope Printing

Updated April 13th, 2020.

Even in this email age we often want to print an envelope. Apple’s Address Book can do it but it’s complicated, and you don’t have a lot of artistic control. Here’s the Print dialog that Address Book makes you wade through– all together now, YUCK.
I decided to use Pages, part of Apple’s very excellent iWork ’09 package, to make myself an envelope template that I really liked, as shown below.

(Here’s your mini “how to make a template in Pages” lesson: create a document– I started with one of Apple’s supplied envelope templates– and make it just the way you want it. Put something generic in for the name and address as I did. Then go to the File menu and Save as Template. Give it a good name and from then on you can create an envelope in Pages by using the Template Chooser.)


I named my envelope template “CB&A Envelopes” but you can call yours anything you like. Do pay attention to the name; you will need it in the next step.

You’re halfway there. Now we have to make a little AppleScript to tell Pages to make an envelope from the template, and then to replace Name, Address, CityStateZip with the address we clicked on in the Address Book. It sounds hard but it won’t be for you, since I’ve written the whole thing for you. Here it is.

–Put this file into your “Address Book Plug-Ins” folder, which lives inside your “Library” folder,
–which lives inside your hard drive. Remember to change “CB&A Envelopes” to the name of your
–envelope template, made using Pages.

using terms from application “Address Book”
on action property
return “address”
end action property

on should enable action for theperson with theEntry
if theEntry ≠ missing value then
return true
else
return false
end if
end should enable action

on action title for theperson with theEntry
— the string in the next line will appear when you click on an address’ label in the Apple Address Book.
return “Make Envelope”
end action title

on perform action for theperson with theEntry
set theAddress to formatted address of theEntry
set theAddress to name of theperson & return & theAddress

tell application “Pages”
activate
–You have to specify a template. Best to make your own. Mine is called “CB&A Envelopes”
set mydoc to make new document with properties {template name:”CB&A Envelopes”}
tell mydoc
set every paragraph to “”
set paragraph 1 to theAddress
end tell
end tell
end perform action
end using terms from

You can copy and paste what I have here into a new AppleScript Editor document (but remember to change “CB&A Envelopes” to your own template’s name), or click here to download the file from me. Either way you still have to specify the name of your envelope template. If you can’t find the AppleScript Editor look in your Utilities folder. If you still can’t find it, look in your Applications folder for “Script Editor.” Same thing, or close enough.

After placing the script into the proper location (Address Book Plug-Ins folder) launch Address Book and click on the label next to an address. The label is the part that says “Home” or “Work” etc. You should see a menu that looks a lot like this one:

Choose “Make Envelope” and what SHOULD happen is Pages comes to the front, an envelope is created based on your template, and the address you chose is filled in nice as pie.

This sounds like a lot of work but it’s not. I’ve written the script for you, and that was the hard part. All you have to do is make an envelope template, make one tiny modification to the script, and save the modified script in the right folder. Do that once and you’ll be able to produce envelopes any time you want– with only a single click. You can email me if you need help making this work.

If you need a copy of Pages you can get it in the iWork ’09 package, available at Amazon.com. Click here* to get it.

Note: your envelope template, and the script, can be copied to any number of machines, ensuring that your entire staff can make the same great envelopes every single time, all with a single click. Note also that my template includes my logo, meaning I don’t have to pay anyone to print envelopes for me 500 at a time. Very nice.


Copyright 2008-2023 Christian Boyce. All rights reserved.

Did this article help you?

Maybe you'd like to contribute to the
Christian Boyce coffee fund.




Want some some quick iPhone how-tos?
Visit me at iPhoneinaminute.com.

Looking for quick tips about Macs?
See my One-Minute Macman website!



Please use the “Sharing” buttons to share what’s interesting with your friends. It helps your friends and it helps me too. Thank you very much!

Sincerely,
Christian signature
Christian Boyce

5 thoughts on “Single-click Envelope Printing

Add yours

Please Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

Read our Privacy Policy