Create a Form File
The first part of this process is creating a form file in Pages:
Open the Data File in Numbers
In Numbers, open the spreadsheet with the names and addresses that will populate the placeholder text defined in step 2. Select all cells with data you want to include in the mail merge. The mail merge app imports only the items you have selected in this step.
Assign Placeholder Tags
Next, you’ll tell the app which fields correspond to which bits of data, and where to find the data.
Choose the Export File’s Format and Location
Next to 4 in the app, click Choose Export Folder and select the location for the merged files to be saved. The app is labeled with numbers for each setting you’ll use to create the mail merge.
Microsoft Word Document.MS Word Doc (encrypted).PDF Document.PDF Document (encrypted).EPUB.Unformatted Text.
Run the Mail Merge
Now that you have assigned placeholder tags from the Pages document to 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. You’re prompted to confirm that you want to perform a data merge using the front Pages document. Click Begin. The mail merge AppleScript you designed with the app runs. A Pages document is created for each person in the spreadsheet and is populated with 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 is named after the envelope template with a number appended after a dash, for example, mailmerge_envelope-1, mailmerge_envelope-2, and so on. When the script finishes, a completion dialog box appears. If you click Show, you are taken to the folder in which the individual files are saved.