six colors

by Jason Snell & Dan Moren

This week's sponsor

Protect your privacy and decipher iOS 11 network features with a new book by Glenn Fleishman. Get 25% off with code SIXCOLORS.

By Dan Moren

Automate This: Mail Merge with Pages and Numbers

When I was a kid, poring over tech books like The Macintosh Bible, I always found myself glossing over the sections about Mail Merge, which I—rightfully, I maintain—dismissed as something boring that only adults had to worry about.

So naturally here I am, twenty-five years later, in a situation where Mail Merge is actually quite useful: I’ve recently been sending out quite a bit of snail mail1, and I discovered that my printer could print envelopes (albeit one at a time, which is kind of a bummer). But rather than typing or copying-and-pasting addresses into the envelope template I set up in Pages, it seemed like it would save time to automate that process. Which is exactly what Mail Merge is supposed to do.

Except Pages doesn’t have a Mail Merge feature.

A little bit of Googling later and I turned up a solution from, of course, from my old Macworld colleague Chris Breen. Chris’s article in turn pointed me towards AppleScript guru Sal Soghoian’s Mac OS X Automation sites. Among the wondrous resources you can find there is a little helper application called Pages Data Merge, which did pretty much exactly what I was looking for.

Pages Data Merge

Long story short, there’s a feature in Pages that lets you tag parts of documents as placeholder text. Those placeholders can then be addressed by scripts, and Pages Data Merge can import rows of data from Numbers (or other sources like a CSV file) and generate separate Pages files (or PDFs, ePubs, DOCs, and more) with the spreadsheet data plugged in to the template.

I used it to grab names and addresses that I’d entered in Numbers, plug them into the envelope template, and then generate individual Pages files for each personalized envelope—and it worked a treat. The one downside is that every time I want to do a new batch I have to remind Pages Data Merge which Numbers columns go to which Pages placeholders, but honestly, that doesn’t take more than 30 seconds or so.

Maybe this isn’t exactly the kind of low-hanging fruit that Apple’s looking to add to Pages, but it’s definitely a bit of a hole in functionality right now. It’s great that Apple’s robust automation (and Sal’s wizardry) means that you can make this work even without Apple building it in, but I would love to see a more robust solution.

In the meantime, if you’ve been looking for a way to personalize this kind of content—and I should note that Pages Data Merge even lets you automatically attach the created files to individualized email messages—then this might work as well for you as it has for me.

  1. Specifically, I’ve been mailing personalized signed bookplates for readers of my book. In case you’re interested.  ↩

[If you appreciate articles like this one, help us continue doing Six Colors (and get some fun benefits) by becoming a Six Colors subscriber.]

[Dan Moren is a tech writer, novelist, podcaster, and the Official Dan of Six Colors. You can email him at or find him on Twitter at @dmoren.]