How to Create a Pages Mail Merge

What to Know

  • Download the Pages Data Merge app and prepare a spreadsheet with mailing data. In Pages, open a template (such as an envelope).
  • Click Format > More, highlight each placeholder text, then click Format > Advanced > Define as Placeholder Text.
  • Open Pages Data Merge and then assign placeholder tags, define the export file's format and location, and run the mail merge.

This article explains how to create a mail merge in Pages, Apple's collaborative word processor. Since Pages doesn't have a built-in mail-merge function, we'll use an app called Pages Data Merge.

Download Pages Data Merge App

Apple Computer Keyboard

Tim Graham / Getty Images

As a preliminary step, download the Pages Data Merge app. You'll find the download link at the bottom of the page. The file downloaded is a zip file. When you double-click it, your Mac will unzip it into a folder named PagesDataMergeApp.

Create a Form File in Pages

Typing on a Mac computer

Aaron Jacobs / Flickr / CC BY 2.0

We're using a simple envelope template in Pages. The mail merge will let us create separate envelopes addressed to each person from our data file.

Define each of the placeholder text that will be filled with the information from our spreadsheet data file (we'll get to the spreadsheet below), such as the person's first name, last name, and their address.

  1. Click Format in the upper right of the Pages window to open the formatting menu on the right side. Then, click the More tab.
  2. On our envelope, highlight each placeholder text, starting with FIRSTNAME.
  3. In the top menu, click Format > Advanced > Define as Placeholder Text.
  4. In the formatting menu at the bottom, under Script Tag, type in a name for this placeholder text field. In this example we use FIRSTNAME.
  5. Repeat step 4 for each placeholder text item that will correspond to data that will be imported from the spreadsheet: LASTNAME, STREET, CITY, STATE, ZIP.

Open the Data File in Numbers

Data file spreadsheet in Numbers for mail merge

In Numbers, open the spreadsheet with the names and addresses that will populate the placeholder text we defined in step 2. Select all of the cells that have the data you want included in the mail merge. The mail merge app will import only the items you have selected in this step.

If your spreadsheet has column headers, they don't have to match the placeholder text names (e.g., FIRSTNAME, LASTNAME, etc.).

Assign Placeholder Tags

Assigning placeholder tags in Pages Data Merge app

Open Pages Data Merge app by double-clicking the unzipped app file named Pages Data Merge.

You'll find that the app is helpfully labeled with numbers for each setting you'll use to create the mail merge process.

  1. Next to 1 in the app, click the menu and choose Selection Numbers Table. Click Import. The first row will be pulled in and displayed.
  2. Select the first item imported—in this case it is the name James.
  3. Next to 2 in the app, click the dropdown menu and choose the placeholder tag FIRSTNAME (this is the first placeholder text item we defined).
  4. Repeat steps 2 and 3 for each item imported until all items are assigned a placeholder tag. For example, select "Jones" and then choose LASTNAME from the dropdown.

Choose the Export File's Format and Location

File format selection in Pages Data Merge app

Next to 3 in the app, choose the file format you would like the mail merge to use for each envelope. In this example, we will select Pages Document. Other options you could select are:

  • Microsoft Word Document
  • MS Word Doc (encrypted)
  • PDF Document
  • PDF Document (encrypted)
  • EPUB
  • Unformatted Text

Next to 4 in the app, click Choose Export Folder and select the location where you want the merged files to be saved.

Number 5 in the app is an optional function that can be used to automatically send individual emails related to the mail merge. We won't be using it in this example.

Run the Mail Merge

Successful mail merge with Pages Data Merge app

Now that you have assigned placeholder tags from the Pages document to all of the data items imported from the Numbers data file, you're ready to run the mail merge.

Next to 6 in the app, click Begin to start the mail merge. You will be prompted to confirm that you want to perform a data merge using the front Pages document. Click Begin.

The mail merge AppleScript you've designed with the app will then run. A Pages document will be created for each person in the spreadsheet and be populated with their names and addresses. You'll see each of these pop open and the data added before the script moves on to the next one.

Each file will be named after the envelope template with a number appended after a dash. For example, mailmerge_envelope-1, mailmerge_envelope-2, etc.

When the script is completed, a completion dialog box will appear. If you click Show, you will be taken to the folder you picked to save the individual files.

Was this page helpful?