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

Page 1 of 11 last Next
  • by bossa,

    bossa bossa Oct 19, 2014 10:16 AM in response to Sal Soghoian
    Level 1 (0 points)
    Oct 19, 2014 10:16 AM in response to Sal Soghoian

    Hi Sal,

    this message ist fantastic for me! Thank you very much. It seemed to be a very good job! I´m a "normal" user and i missed the data merge feature a lot. Your Pages Data Merge App give us the data merge feature back!

    Questions: 1) Is there a possibility to get as the result not single pages files, but one document with the whole merge datas? In iwork 09 there was a switch to choose it. 2) A little nice icon is missing :-)

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Oct 19, 2014 11:21 AM in response to bossa
    Level 2 (176 points)
    Oct 19, 2014 11:21 AM in response to bossa

    Thanks for the feedback!

     

    Let me make sure I understand your request. You want the output to be a single file containing merged content? Is that correct?

     

    If so:

     

    1) Since the Pages Data Merge application works with both word-processing OR layout documents, which text would you want to be part of the merged flow? Only the text from the main body in word-processing mode? What about other any other text boxes in the document? What if the document does not have a main body text flow?

     

    2) I assume you would still want to be able to choose the output format? Pages, unformatted text, MS Word, PDF, etc.

     

    Thanks,

     

    Sal

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Oct 19, 2014 12:11 PM in response to bossa
    Level 2 (176 points)
    Oct 19, 2014 12:11 PM in response to bossa

    Also, please allow me one other question:

     

    If the output of the data merge is to be a single text flow, how is the single flow ultimately used? Do you copy and paste sections from it into other documents? If so, what kind of documents?

     

    Thanks!

  • by bossa,

    bossa bossa Oct 19, 2014 12:55 PM in response to Sal Soghoian
    Level 1 (0 points)
    Oct 19, 2014 12:55 PM in response to Sal Soghoian

    My suggestion is not that complicated. The result of the data merge app are individual files. I want a single file with all the data merged content. May be there are separated by page separators (i dont know the correct englisch impression).  The output format is not my problem. The data merge app lets me select the output format, i want to get.

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Oct 19, 2014 1:21 PM in response to bossa
    Level 2 (176 points)
    Oct 19, 2014 1:21 PM in response to bossa

    My apologies for not being clear. Let me try again.

     

    1) Am I correct in assuming that you want the merged document content repeated in a single output document? So if the document to be merged is 4 pages in length, you would like to have those same 4 pages appended to the same document for each spreadsheet row that gets processed? This includes pictures, movies, etc. that are part of the document?

     

    2) What is the ultimate use of the single-combined document? What do you do with the combined content document?

     

    3) Am I correct in thinking that your source document is a word-processing document (not a layout document) and you're only interested in repeating the main body flow for each spreadsheet record?

     

    Thanks!


    Sal

  • by bossa,

    bossa bossa Oct 19, 2014 1:25 PM in response to Sal Soghoian
    Level 1 (0 points)
    Oct 19, 2014 1:25 PM in response to Sal Soghoian

    1) yes!

    2) Why should the result separated files? If i print it out, the result is the same, wether i have separated files or one file with all the separated files included! But the file manage is simpler.

    3) For me it doesn´t matter, i think!

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Oct 19, 2014 3:10 PM in response to bossa
    Level 2 (176 points)
    Oct 19, 2014 3:10 PM in response to bossa

    Ah, I understand! So the eventual use is to _print_ the documents.

     

    No problem. The Pages Data Merge application might be fine just as it is. Try this:

     

    1) Use the output to PDF option. Using this setting will create a folder with the individual files as PDF files

    2) Instead of printing each PDF file, one-at-a-time, by opening each file, choosing Print, etc., simply either drag the files from the created output folder:

         • Into the print job window for your Printer Queue application; or…

         • open Home > Library > Printers folder and drag the PDF files onto the icon for the printer

     

    Using the drag method should print all of the documents automatically for you without you having to open them!

     

    Cheers,


    Sal

  • by bossa,

    bossa bossa Oct 20, 2014 12:24 AM in response to Sal Soghoian
    Level 1 (0 points)
    Oct 20, 2014 12:24 AM in response to Sal Soghoian

    Okay, thank you! This is solution to print it out. But i think one document with all the merged content is much more comfortable. How can i merged the documents if the output are pages documents?

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Oct 20, 2014 6:06 AM in response to bossa
    Level 2 (176 points)
    Oct 20, 2014 6:06 AM in response to bossa

    You can automate the combining of multiple PDF files <http://macosxautomation.com/automator/combinePDFs/index.html> but I'm not sure how to accomplish the same thing in an automated fashion with Pages documents.

     

    Cheers,

     

    Sal

  • by Jeff Shenk,

    Jeff Shenk Jeff Shenk Oct 20, 2014 6:35 AM in response to Sal Soghoian
    Level 4 (2,803 points)
    Oct 20, 2014 6:35 AM in response to Sal Soghoian

    Sal,

     

    The old Mail Merge to a single document with section breaks between the versions of the source document was also useful for things like labels where you actually want multiple entries on a single page. It was possible to do that with a Find and Replace to change the section break to a return.

     

    I suspect that now you would have to use AppleScript for the Find and Replace, because the version in Pages 5 doesn't work with breaks and returns.

     

    Jeff

  • by bossa,

    bossa bossa Oct 20, 2014 8:49 AM in response to Jeff Shenk
    Level 1 (0 points)
    Oct 20, 2014 8:49 AM in response to Jeff Shenk

    I agree with Jeff!

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Oct 20, 2014 9:17 AM in response to Jeff Shenk
    Level 2 (176 points)
    Oct 20, 2014 9:17 AM in response to Jeff Shenk

    Interesting. Since text placeholders "disappear" once they've been replaced, it may be possible to process and entire page of labels using positional location of remaining placeholders. However, I think a better approach is to use the script tags to give each label group a unique identity.

     

    For example, say a single page of labels contains 10 label groups (a label group being a set of identified text placeholders). The script tags for the first label group could be tagged like this: 1-First Name, 1-Last Name, 1-Address, etc. the second group could be 2-First Name, etc. A script could then do the following:

     

    • extract act a row from the source data and parse it into match script tags: cell 1 = first name, etc.
    • locate the text text placeholders on the current page that begin with the current loop number, like 1, 2, 3, etc.
    • replace those tags with the row data
    • repeat while iterating the loop number
    • when a page has no more placeholders, generate a new page of the template document and reset the loop counter

     

    Using this his technique a script could process sheets of labels!

     

    interesting. Let me look into this. If I come up with a solution, I'll post the script on the website.

     

    THanks!

  • by enteecee,

    enteecee enteecee Oct 20, 2014 11:45 AM in response to Sal Soghoian
    Level 2 (315 points)
    Oct 20, 2014 11:45 AM in response to Sal Soghoian

    Or, y'know... just use Pages '09 while searching for an application that meets your basic needs without such hacks.

  • by bossa,

    bossa bossa Oct 20, 2014 12:13 PM in response to enteecee
    Level 1 (0 points)
    Oct 20, 2014 12:13 PM in response to enteecee

    Oh no, lets look forward!

Page 1 of 11 last Next