Mail merge

How to create mail merge documents with Pages and Numbers

Reader Ann Grace wants to send form letters to her clients. She writes:

I recently upgraded to OS X Yosemite as well as the latest versions of Apple’s Numbers and Pages apps. Is there a way to use both to create mail merge documents?

There is, although it’s not a feature directly built into either app. This is possible thanks to the power of AppleScript (don’t worry, I’m not going to ask you to learn AppleScript to do this job). Instead, I’ll direct you to the Mac OS X Automation site. Here you will find an AppleScript and Pages page that provides instructions for using the free Pages Data Merge utility (the page also includes a link to this utility). As the name suggests, it lets you incorporate data found in a Numbers spreadsheet into a Pages document.

A movie on the page describes the process from start to finish but I can give you the gist.

You start by creating a Pages document that serves as a template for your merged documents. Feel free to insert real or fake names, addresses, phone numbers, email addresses, etc. for placeholder text. They will be replaced later by your merged data. If the Format pane is not present, click the Format button in the Pages toolbar and click the More tab.

Now select the first placeholder entry and from the Format Pages menu choose Advanced > Set as placeholder text. A Script Tag field will appear in the Text pane on the right. In this field, enter the name of your placeholder: FIRST NAME, ADDRESS, PHONE, MATTRESS NAME or whatever is most appropriate. Repeat for each piece of text you want to use as a placeholder.


Select the placeholder text and give it a script tag.

You then launch Numbers and create a spreadsheet that includes columns for each entry. (The column header doesn’t have to match the placeholder names you created.) Now select all the rows containing the data you want to merge.

numbers mailing

In Numbers, create a spreadsheet containing the data you want to merge.

Launch the Pages Data Merge app and follow the numbered steps. In the area marked with a 1, choose Number Selection Chart in the context menu and click the Import button. When you do, the information from the first column of the Numbers document will appear in the Data Record Items box.

Select the first item in the list (in my example you would select Franc). Click on the context menu next to the second step and you will see a list of all the placeholders you have created in the Pages document. Select the one associated with the entry you highlighted in step 1 (in the example, you would choose FIRST NAME). When you make a selection in the second step, its name appears under the Placeholder tags assigned in the first step heading. Repeat the operation for each entry in the list.

merging page data

The Pages Data Merge app.

In step 5, you can choose to email a copy of your merged document to your recipients. For this to work, you need to create a list of email addresses for your recipients in your Numbers document (you don’t need to have an email placeholder in the Pages document). If you intend to send the results of your work by e-mail, select the e-mail address that appears in the list in step 1 and, from the context menu in step 2, choose Assign as e-mail recipient address. The letter M will appear to the right of the selected email address, indicating that the addresses in this column will be used as the destination address in your messages.

It is also in the contextual menu of step 2 that you can choose the name of your merged documents. By default, they are assigned with the document name of Pages followed by a number—Unsolicited Pitch-1, Unsolicited Pitch-2, etc But you can change that. Select the recipient’s name under the first step, then choose Assign to use with file naming from this context menu. When you do this, the document name will always appear first, but it will be followed by the data in the selected field—Unsolicited Pitch-Frank and Unsolicited Pitch-Doris, for example.

In step 3, you choose the format of the export file, whether you produce a Pages document, Word (encrypted or not), PDF (encrypted or not), ePub or an unformatted text document for each merged file.

Click on Choose export folder in step 4 and select a destination for your merged copies. A Pages Data Merge folder containing your merged documents will be created in this location.

And finally to the optional step 5. If, as I mentioned, you want to email copies of your merged documents, enable the Attach option and enter a subject and a message. As promised, a copy of your merged file will be sent to the addresses of those in your Numbers document.

Finally, click Start. After confirming that you want to generate your merged files, Pages Data Merge will take care of creating and exporting the copies you requested.

You have a question? Send a message to [email protected]