Pages 5.5 Mail and Data Merge

Pages 5.5 includes new scripting support for locating and replacing text placeholders. In addition, text placeholders can be "tagged" in the application interface, with script identifiers by selecting the text placeholder to tag and entering its "script tag" in the the new Script Tag field available at the bottom of the More tab in the format sidebar. With this new ability, scripts can replace the text placeholders in a document with data from other sources, including Numbers spreadsheets.


But you don't have to write scripts to take advantage of this new feature!


To make it easy for non-scripters to perform Mail merges, and other automated data merging tasks, there is a free application, the Pages Data Merge application, available at: http://iworkautomation.com/pages/script-tags-data-merge.html


Watch the movie, follow the instructions, and give it a try!

Posted on Oct 17, 2014 2:43 PM

Reply
174 replies

Apr 6, 2015 2:02 PM in response to Sal Soghoian

That works but now I'm getting the -2700 error that I saw on someone else's post.


4/6/15 2:41:23.772 PM discoveryd[2147]: Basic Sockets SetDelegatePID() failed for PID[2810] errno[3] result[-1]

4/6/15 2:43:17.839 PM discoveryd[2147]: Basic Sockets SetDelegatePID() failed for PID[2810] errno[3] result[-1]

4/6/15 2:43:37.539 PM discoveryd[2147]: Basic Sockets SetDelegatePID() failed for PID[2810] errno[3] result[-1]

4/6/15 2:43:58.188 PM Pages Data Merge[4078]: applicationWillFinishLaunching:

4/6/15 2:43:58.188 PM Pages Data Merge[4078]: Checking ASOC framework…

4/6/15 2:43:58.188 PM Pages Data Merge[4078]: (

(

"FIRST ITEM",

"SECOND ITEM",

"THIRD ITEM"

),

(

"FOURTH ITEM",

"FITH ITEM",

"SIXTH ITEM"

)

)

4/6/15 2:43:58.189 PM Pages Data Merge[4078]: Reseting stored export location…

4/6/15 2:43:58.189 PM Pages Data Merge[4078]: Reseting progress values to default…

4/6/15 2:43:58.226 PM Pages Data Merge[4078]: *** -[AppDelegate applicationWillFinishLaunching:]: Pages got an error: every document of application id "com.apple.iWork.Pages" of «script» doesn’t understand the “count” message. (error -1708)

4/6/15 2:44:00.981 PM Pages Data Merge[4078]: GETTING CURRENT DOCUMENT TAGS

4/6/15 2:44:00.984 PM Pages Data Merge[4078]: Problem getting tags

4/6/15 2:44:03.809 PM Pages Data Merge[4078]: OK

4/6/15 4:59:27.363 PM Pages Data Merge[4205]: User clicked Begin button

4/6/15 4:59:27.363 PM Pages Data Merge[4205]: Checking source data…

4/6/15 4:59:27.363 PM Pages Data Merge[4205]: Checking destination folder…

4/6/15 4:59:27.363 PM Pages Data Merge[4205]: Checking password…

4/6/15 4:59:27.364 PM Pages Data Merge[4205]: Checking mail subject…

4/6/15 4:59:27.364 PM Pages Data Merge[4205]: Posting confirmation alert…

4/6/15 4:59:29.514 PM Pages Data Merge[4205]: beginProcessing:

4/6/15 4:59:29.514 PM Pages Data Merge[4205]: Calling performSelector:

4/6/15 4:59:29.788 PM Pages Data Merge[4205]: beginProcessingForReal:

4/6/15 4:59:29.789 PM Pages Data Merge[4205]: outputFormatIndicator: 3

4/6/15 4:59:29.789 PM Pages Data Merge[4205]: automaticallySendMessages: false

4/6/15 4:59:29.789 PM Pages Data Merge[4205]: sourceData class: list

4/6/15 4:59:29.789 PM Pages Data Merge[4205]: cellCount: 8

4/6/15 4:59:29.789 PM Pages Data Merge[4205]: {

mailFlag = "";

placeholderItem = AUTHORS;

sourceItem = a;

}

4/6/15 4:59:29.789 PM Pages Data Merge[4205]: thisPlaceholderTag: AUTHORS

4/6/15 4:59:29.790 PM Pages Data Merge[4205]: {

mailFlag = "";

placeholderItem = NUMBER;

sourceItem = b;

}

4/6/15 4:59:29.790 PM Pages Data Merge[4205]: thisPlaceholderTag: NUMBER

4/6/15 4:59:29.790 PM Pages Data Merge[4205]: {

mailFlag = "";

placeholderItem = TITLE;

sourceItem = c;

}

4/6/15 4:59:29.790 PM Pages Data Merge[4205]: thisPlaceholderTag: TITLE

4/6/15 4:59:29.791 PM Pages Data Merge[4205]: {

mailFlag = "";

placeholderItem = "";

sourceItem = "<null>";

}

4/6/15 4:59:29.791 PM Pages Data Merge[4205]: thisPlaceholderTag:

4/6/15 4:59:29.791 PM Pages Data Merge[4205]: {

mailFlag = "";

placeholderItem = "";

sourceItem = "<null>";

}

4/6/15 4:59:29.791 PM Pages Data Merge[4205]: thisPlaceholderTag:

4/6/15 4:59:29.791 PM Pages Data Merge[4205]: {

mailFlag = "";

placeholderItem = "";

sourceItem = "<null>";

}

4/6/15 4:59:29.791 PM Pages Data Merge[4205]: thisPlaceholderTag:

4/6/15 4:59:29.792 PM Pages Data Merge[4205]: {

mailFlag = "";

placeholderItem = "";

sourceItem = "<null>";

}

4/6/15 4:59:29.792 PM Pages Data Merge[4205]: thisPlaceholderTag:

4/6/15 4:59:29.792 PM Pages Data Merge[4205]: {

mailFlag = "";

placeholderItem = "";

sourceItem = "<null>";

}

4/6/15 4:59:29.792 PM Pages Data Merge[4205]: thisPlaceholderTag:

4/6/15 4:59:29.793 PM Pages Data Merge[4205]: (

1,

2,

3

)

4/6/15 4:59:29.793 PM Pages Data Merge[4205]: (

AUTHORS,

NUMBER,

TITLE

)

4/6/15 4:59:29.793 PM Pages Data Merge[4205]: targetMailAddressIndex : false

4/6/15 4:59:29.793 PM Pages Data Merge[4205]: targetNameAddOnIndex: false

4/6/15 4:59:29.793 PM Pages Data Merge[4205]: Email address check…

4/6/15 4:59:29.793 PM Pages Data Merge[4205]: targetTags check…

4/6/15 4:59:29.823 PM Pages Data Merge[4205]: tempFolder: Macintosh HD:private:var:folders:4l:pn446k9x62z5dx96l94gbywm0000gn:T:TemporaryItems:B0E2D 204-1C81-4EE8-8552-7AEDDB6A7D82:

4/6/15 4:59:29.823 PM Pages Data Merge[4205]: Checking document properties…

Apr 6, 2015 2:59 PM in response to Kayak Coach

It's still having a problem seeing the document and the tags:


4/6/15 2:43:58.226 PM Pages Data Merge[4078]: *** -[AppDelegate applicationWillFinishLaunching:]: Pages got an error: every document of application id "com.apple.iWork.Pages" of «script» doesn’t understand the “count” message. (error -1708)


4/6/15 2:44:00.984 PM Pages Data Merge[4078]: Problem getting tags


Can you post a picture of the document and of the settings in the Data Merge app?


Also, what is the source of the data? Numbers table? CSV file?

Apr 23, 2015 2:11 PM in response to Sal Soghoian

First off, great app. I'm lost without the ability to do a mail merge and think it's terrible that Apple dropped that feature from Pages 5. Apple should thank its lucky stars that people like you are willing to fill in its deliberately created gaps in the software.


Unfortunately, I'm having the same issue as jeffallen1, wherein I too need to have multiple merges on a single page. Do you have an update on your progress toward a solution?

May 9, 2015 10:50 AM in response to Sal Soghoian

Thanks for this very helpful app Sal.


As per some of the others on here, I would welcome an option to merge to a single document for printing. I can however use a workaround for this, so it's not a big issue.


What is an issue is how the app handles empty cells in numbers. I am using the app to merge postal addresses and some cells don't have any data - where there is no data found I need to not have a gap in the address - i.e. an empty line. Is there any workaround for this?


Thanks,


Nick

May 10, 2015 6:33 AM in response to nick_harambee

OK. Thank you.


So, you'd like to not have the blank lines when a placeholder has a null value.


First, the bad news. The script only can "see" and replace the text placeholders. It does not actually "see" the text containing or around the placeholder and so cannot collapse blank lines to only have lines with data as you want. However...


You can accomplish this in the data source! Create a summary row cell that uses a formula to produce composite address data, like: if cell CITY is not null then set RESULT to RESULT & CITY, etc. (I don't know what the formula would actually be, perhaps someone here could assist).


Next, instead of having multiple placeholders for the address data, use a single address placeholder and set its value to be the contents of the composite row cell That way you always get addresses without spaces or missing lines!


So to summarize. In the source data spreadsheet, create a new data cell containing the composite of other address item cells and use a single placeholder targeting the contents of the composite data cell. That should do it!


Cheers,

Sal

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Pages 5.5 Mail and Data Merge

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.