Sal Soghoian

Q: 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

Close

Q: Pages 5.5 Mail and Data Merge

  • All replies
  • Helpful answers

first Previous Page 8 of 11 last Next
  • by Kayak Coach,

    Kayak Coach Kayak Coach Apr 6, 2015 1:52 PM in response to Sal Soghoian
    Level 1 (0 points)
    Apr 6, 2015 1:52 PM in response to Sal Soghoian

    I did have it open and the template up.  Not sure if it makes sense, but I hadn't closed Pages and reopened it since downloading the app.  Reopened Pages and it now sees it. 

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Apr 6, 2015 1:55 PM in response to Kayak Coach
    Level 2 (176 points)
    Apr 6, 2015 1:55 PM in response to Kayak Coach

    Ah, right. The Merge app was not "seeing" or communicating with Pages. The restart would have fixed that. Glad it's working.

  • by Kayak Coach,

    Kayak Coach Kayak Coach Apr 6, 2015 2:02 PM in response to Sal Soghoian
    Level 1 (0 points)
    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…

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Apr 6, 2015 2:59 PM in response to Kayak Coach
    Level 2 (176 points)
    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?

  • by Kayak Coach,

    Kayak Coach Kayak Coach Apr 6, 2015 4:43 PM in response to Sal Soghoian
    Level 1 (0 points)
    Apr 6, 2015 4:43 PM in response to Sal Soghoian

    Here is a pic of the portion of the pages file with the tags in caps. 

     

    pages.jpg

     

     

    Settings on merge app

    Mergeapp.jpg

     

     

    The source is a Numbers table.

     

    numbers.jpg

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Apr 6, 2015 5:33 PM in response to Kayak Coach
    Level 2 (176 points)
    Apr 6, 2015 5:33 PM in response to Kayak Coach

    Don't select the column headers, just select the data and try again -- or leave the selection as is and select the Skip First Row checkbox in the Merge app.

  • by sheila0139,

    sheila0139 sheila0139 Apr 13, 2015 10:36 AM in response to Sal Soghoian
    Level 1 (0 points)
    Apr 13, 2015 10:36 AM in response to Sal Soghoian

    I Have a similar question. Does pages 5.5.2 allow mail merge from contacts Address book?

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Apr 13, 2015 10:47 AM in response to sheila0139
    Level 2 (176 points)
    Apr 13, 2015 10:47 AM in response to sheila0139

    The latest version of Pages does not have built-in mail merge support.

     

    To merge with an address book, use the script provided here:

     

    <https://iworkautomation.com/pages/examples-mail-merge.html>

     

    To merge with Numbers tables and spreadsheets, use the Pages Data Merge application provided here:

    <https://iworkautomation.com/pages/script-tags-data-merge.html>

  • by James Milks,

    James Milks James Milks Apr 23, 2015 2:11 PM in response to Sal Soghoian
    Level 1 (5 points)
    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?

  • by nick_harambee,

    nick_harambee nick_harambee May 9, 2015 10:50 AM in response to Sal Soghoian
    Level 1 (5 points)
    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

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian May 9, 2015 12:05 PM in response to nick_harambee
    Level 2 (176 points)
    May 9, 2015 12:05 PM in response to nick_harambee

    Hmmm. I think I understand what you're asking for, but just to be clear, can you post a screen cap of what you'd like NOT to happen? Thanks -- SAL

  • by nick_harambee,

    nick_harambee nick_harambee May 9, 2015 1:40 PM in response to Sal Soghoian
    Level 1 (5 points)
    May 9, 2015 1:40 PM in response to Sal Soghoian

    Thanks for your swift response Sal,  Instead of this:

    Screenshot 2015-05-09 21.34.43.png

    I would like this:

    Screenshot 2015-05-09 21.34.53.png

    In my Numbers spreadsheet there are two columns between 'London' and 'NW1 0PE' which are used for some addresses but not others.

     

    I hope this helps clarify.

     

    Nick

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian May 9, 2015 7:24 PM in response to nick_harambee
    Level 2 (176 points)
    May 9, 2015 7:24 PM in response to nick_harambee

    OK, one more thing. Post a picture of the text placeholders you're using for the address.

     

    Thanks,


    Sal

  • by nick_harambee,

    nick_harambee nick_harambee May 10, 2015 1:50 AM in response to Sal Soghoian
    Level 1 (5 points)
    May 10, 2015 1:50 AM in response to Sal Soghoian

    Here you go:

     

    Screenshot 2015-05-10 09.49.40.png

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian May 10, 2015 6:33 AM in response to nick_harambee
    Level 2 (176 points)
    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

first Previous Page 8 of 11 last Next