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 4 of 11 last Next
  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Dec 2, 2014 6:11 PM in response to macmikey
    Level 2 (176 points)
    Dec 2, 2014 6:11 PM in response to macmikey

    Apparently the issue is with "merge" fields in older templates needing to be converted to "text placeholders" so that they can be recognized by the new scripting support in the latest Pages. Try converting any merge fields to text placeholders by selecting the text and selecting the appropriate keyboard command (I think it's control-option-command-T?).

     

    Does that work for you?

  • by macmikey,

    macmikey macmikey Dec 3, 2014 10:07 AM in response to PeterBreis0807
    Level 1 (41 points)
    Mac OS X
    Dec 3, 2014 10:07 AM in response to PeterBreis0807

    Hi Peter,

     

    While I often share your frustration with the cutting (or poor implementation) of many standard Pages '09 features in Pages 5.5, and even that it is a comparatively inferior product, it is what it is. You are entitled to your opinion, but it is not productive in this thread. Though if you need to vent, I can appreciate that, too. ;-)

     

    That said, Numbers 3 is infinitely better (IMNSHO) than Numbers '09. Not a chance I would go back. And since Pages 5.5 (such as is is) plays better with Numbers 3, I am willing to tolerate Pages 5.5. Can't speak to Keynote, I rarely use it. But Numbers makes it all worthwhile. Or at least bearable.

  • by PeterBreis0807,

    PeterBreis0807 PeterBreis0807 Dec 3, 2014 10:28 AM in response to macmikey
    Level 8 (35,663 points)
    Mac OS X
    Dec 3, 2014 10:28 AM in response to macmikey

    Can't say I was venting, just making an unfortunately accurate statement.

     

    I am curious how Numbers 3 plays better with Pages. To my knowledge Merging is gone (AppleScript aside) and you can no longer copy over live charts. What other interaction is there between them?

     

    Also the ongoing chain of incompatibilities just keeps up the pain. Or is the entire known universe now on Yosemite, including all the Mac users who can't install it?

     

    I can't see how covering up the failings of the latest iWork Apps is productive.

     

    Peter

  • by macmikey,

    macmikey macmikey Dec 3, 2014 12:41 PM in response to Sal Soghoian
    Level 1 (41 points)
    Mac OS X
    Dec 3, 2014 12:41 PM in response to Sal Soghoian

    Sal,

     

    Here's what I did:

     

    1. Opened an older (Pages '09) letter in Pages '09 (Pages 5.5 said the letter was "too old," so I "unconverted" to '09, then opened "updated" letter in 5.5)
    2. Replaced the existing name and contact information with "placeholder-text-to-be" (e.g., changed "John Smith" to "CONTACT_NAME")--so, to be clear, they were not text placeholders originally)
    3. Selected those text placeholders and defined them thusly via Format > Advanced > Define as Placeholder Text
    4. In "Text" pane, under "Script Tag," typed "CONTROL_NAME" (Yes, I know I didn't HAVE to name them the same, but I freely admit to being borderline OCD. )
    5. Repeated 2-4 until I had all the tags I needed.
    6. Left this document as frontmost.
    7. In Numbers, selected the records from my mailing list
    8. Opened Pages Data Merge app
    9. IMMEDIATELY Pages Data Merge notified me that there is an "error" with the Pages document, that it "can't find text placeholders"--even though I had already defined them in step 3

     

    What I'm thinking must have happened is that when I opened the Pages 09 version document in 5.5, when asked if I wanted to "upgrade this Pages '09 document" or "edit a copy," I don't remember which I picked. In either case, as I was working with either an alternate or upgrade, I figured I was still dealing with a 5.5 version. I've repeated the experiment several times and gotten the same results: "READ ERROR: There was a problem getting the placeholder tags from the front Pages document." I'm pretty sure that a file converted to 5.5 may mean it will work fine in 5.5, but it doesn't play nice with any other app that thinks it's a bona fide 5.5 document (or corrupted one).

     

    I've been testing it on this document: https://www.dropbox.com/s/471n9hrdq9kytw3/Test%20Cover%20Letter%20copy.pages?dl= 0. Same results. However, if I instantiated a new, fresh, clean document, and just copy and paste from the "corrupted" version into the new, fresh, clean one, it works fine. So I'm pretty sure there's some legacy garbage that makes it over into the new version (at least, it does on my machine) that Pages Data Merge doesn't like. I can't be sure if this is just me, or others might experience the same thing; there's no way for me to test this, as I only have one Mac handy. (I know, that's like a sacrilege or something.)

     

    Now, having said all this, I don't know that I would recommend bothering to "fix" this in the script (especially if you can't reproduce my experience), though it's yours, you can do with it as you like. I would simply advise users with the caveat that it doesn't like non-native Pages 5.5 documents. But if you're as OCD as I am, you'll probably be driven to fix it.

     

    But when it works (i.e., when it's handed the right kind of documents), this app is AWESOME. I don't want to leave without pointing that out--this program is a godsend. Thanks for your work on it!

  • by macmikey,

    macmikey macmikey Dec 3, 2014 1:06 PM in response to PeterBreis0807
    Level 1 (41 points)
    Mac OS X
    Dec 3, 2014 1:06 PM in response to PeterBreis0807

    Well, I wanted to say "ranting" before, but thought "venting" would be more honey than vinegar. YMMV.

     

    My point was simply that it didn't really address the problem at hand. I'm not arguing that your point is invalid (or even that I don't agree with it), only that it didn't bring in a viable option or solution. Going back to iWork '09 isn't an option for a lot of us. (Just because I have '09 on my machine doesn't mean it will be easy or practical to "downgrade"--again, a matter of interpretation--all my iWork '14 documents.)

     

    As to Numbers & Pages playing together, are you talking about Numbers 3.5 and Pages 5.5 (most current version of both)? In my experience, they work as well together as Numbers '09 and Pages '09 did/do, but there's so much layout functionality in Numbers, I almost never have cause to test that, so I can't really say that I have a thoroughly informed opinion.

     

    The "ongoing chain of incompatibilities" you refer to... do you mean bugs and/or inadequacies, or are you still referring to Numbers and Pages not getting along? If it's the former, it is the actual case that Apple is making headway on this, slow and inadequate as it may be. If it's the latter, again, I don't really have to truck data back and forth between the two to say anything useful. It works fine for me.

     

    All that being said, and at the risk of sounding like a commercial, coming up with an app like Pages Data Merge accomplishes precisely what all applications are for: to address a practical problem with a software solution. Yes, it would have been (and still would be) better if Apple had not turned out an inadequate product and left data merge functionality in Pages. But solving the problem with one's own ingenuity doesn't need to be reduced to "covering up the failings" of another. I see your point, but keep in mind: the glass is half full, too.

  • by PeterBreis0807,

    PeterBreis0807 PeterBreis0807 Dec 3, 2014 5:29 PM in response to macmikey
    Level 8 (35,663 points)
    Mac OS X
    Dec 3, 2014 5:29 PM in response to macmikey

    Well let's not call that a rant, but you still have not said how:

     

    …since Pages 5.5 (such as is is) plays better with Numbers 3, I am willing to tolerate Pages 5.5.

     

    In fact after having made such a bald statement you then turn around and confess you have no idea how. Why did you say it then as it was the substantial reason you claimed for using both? This too often is what you get. We here can detail the over 100 missing features and the innumerable bugs in Pages 5.5.1, but people such as yourself just say "its better". Not really a rational debate is it?

     

    Look you can keep using Pages 5.5.1 and Pages 3.5 if you think it is somehow "better", but on examining the facts when that clearly is not true, it just makes it another example of the Stockholm Syndrome that I like to refer to my son, the Psychologist.

     

    The ongoing incompatibilities I referred to are the continuing mutually incompatible changes to the file formats that mean people not using the current System can not open the files. Something that along with the long list of missing features just makes continuing with the iWork suite ongoing churn with an almost certain prospect that your files will be ultimately unusable.

     

    Progress on updating Pages is glacially slow, as I have pointed out multiple times at this rate it will be 2023 before it catches up with 2009. Pages Data Merge did not come from Apple, it is a clumsy and awkward fix using AppleScript and is not a shining beacon on the hill of good things to come. If you have to resort increasingly to patches like this to get common things to work, you are more expert at wasting time than at using Pages. Which I think is the real nub of the problem, not knowing much on the subject, it is all the same to you.

     

    Peter

     

    btw There is no "iWork '14". Further, there is no reason you can not keep using iWork '09, a format that can be shared with users on Snow Leopard, Lion, Mountain Lion, Mavericks and Yosemite and even cleanly exported to Word .doc/x something which eludes Pages 5.5.1 users too often.

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Dec 3, 2014 6:50 PM in response to macmikey
    Level 2 (176 points)
    Dec 3, 2014 6:50 PM in response to macmikey

    Thank you for the thorough detective work. I'll pass your findings on to the team. I'm gratified that you find the Data Merge application useful, as you mentioned, it's all about finding solutions to challenges. I'll take your suggestion and add a note to the webpage alerting users as to the issue with 09 documents.

     

    Thanks again for your assistance! -- SAL

  • by PeterBreis0807,

    PeterBreis0807 PeterBreis0807 Dec 3, 2014 6:59 PM in response to Sal Soghoian
    Level 8 (35,663 points)
    Mac OS X
    Dec 3, 2014 6:59 PM in response to Sal Soghoian

    Sal

     

    Can I make it clear I am not criticising you or the rest of the team for creating Data Merge. I think you are doing a great job.

     

    I am criticising the necessity of having to use it.

     

    Having to go to third party solutions to patch basic functions is the problem. Especially as you have to admit it involves fiddling to get it to do what it is supposed to do.

     

    Peter

  • by macmikey,

    macmikey macmikey Dec 3, 2014 11:26 PM in response to PeterBreis0807
    Level 1 (41 points)
    Mac OS X
    Dec 3, 2014 11:26 PM in response to PeterBreis0807

    Unbelievable.

     

    I feel like I'm arguing with a child with whom, on the UNRELATED issue of the overall quality of Pages 5.5, I have ALREADY AGREED MULTIPLE TIMES. I tried and tried to be congenial and deferential with you, just to ask for a little clarification here, a little perspective there, but I'm all spent. I don't have it in me to further feed your poor need for conflict. I mean, I did have this HUGE response to you point by point, but if "brevity is the soul of wit," I think I can be just a very little bit witty:

     

    You are right. Your opinions are right. I agreed, and still agree, with most of them: that Apple really screwed up with iWork '14 (and yes, I know that's not it's real name, but if you know what I mean like everyone else does, I just can't bring myself to care that it bothers you). I simply assert that your opinions are utterly irrelevant and useless. They have still accomplished nothing, they have still solved no problems, children in Africa are still starving, and the Cubs are still not going to win the World Series. You've successfully accomplished nothing but to demonstrate how smart you think you are and how dumb anyone must be who even tries to solve a problem themselves. Know what? No one's impressed.

     

    I had to chuckle at your "clumsy and awkward" apology to Sal and his team. Perhaps if you would spend more time contributing to solutions rather than complaining and generally acting like a child with a product pamphlet and a thesaurus, you wouldn't need to walk your words back.

  • by PeterBreis0807,

    PeterBreis0807 PeterBreis0807 Dec 3, 2014 11:46 PM in response to macmikey
    Level 8 (35,663 points)
    Mac OS X
    Dec 3, 2014 11:46 PM in response to macmikey

    You are missing the point and have from the first exchange.

     

    Look at the points under my name and look at the points under yours. Also look through the forums to see who has or hasn't solved users' problems.

     

    There was no "apology" to Sal, I simply didn't want him to think this has anything to do with what he has done, because it hasn't.

     

    I get your mindset but that isn't the issue either. The real solution is to decide what software you use. That has consequences, and in this case it is not something you can sweep under the carpet because this particular matter, merging, is only a small part of the overall issue. The problems of Apple's huge changes to the iWork suite last September are ongoing. Most of us are just treading water until an adequate replacement can be found, meanwhile the forum is flooded with users who don't know what has happened and are only now, even a year later, stumbling onto the issues. They honestly don't know what happened, nor the trajectory of the changes and are committing their work to software that they think has a long term future, but doesn't.

     

    So my exchanges with you are not to persuade you of anything, you obviously have made your mind up, but to keep the topic in perspective for others who will read it.

     

    Take it as you will.

     

    Peter

  • by Chachooga,

    Chachooga Chachooga Dec 4, 2014 12:04 PM in response to Sal Soghoian
    Level 1 (0 points)
    Dec 4, 2014 12:04 PM in response to Sal Soghoian

    Sal,

     

    I am trying to create envelopes.  I would prefer that all of the envelopes once merged would appear in one PDF file with numerous pages.  Right now it creates each envelope individually.

     

    I just switched to MAC from PC for doing my newsletter publishing and mailings.  It has been nothing but crap.  I can't even get the merge together it has been all afternoon.  Your app is very helpful but tedious because I am creating 250 envelopes. 

     

    Microsoft Office (word and publisher) was great for me and i just assumed MAC would be easy to transition to.  Annoyingly that is not that case.

     

    Thank you Sal.

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Dec 4, 2014 1:20 PM in response to Chachooga
    Level 2 (176 points)
    Dec 4, 2014 1:20 PM in response to Chachooga

    Glad to assist.

     

    Combining multiple PDF files into a single file is really no problem. The documentation at the bottom of the Pages Data Merge page <http://iworkautomation.com/pages/script-tags-data-merge.html> links to a free system service for combining selected PDF files into a single file: <http://macosxautomation.com/automator/combinePDFs/index.html>

     

    With that in mind, the best strategy is to use the Data Merge application to create as many PDF files as needed, select the created PDF files in the new folder that is created with them, and select the system service (you install from the linked page) from the action menu at the top of the Finder window. The service will create a new combined PDF file on the desktop for you.

     

    Sal

  • by PeterBreis0807,

    PeterBreis0807 PeterBreis0807 Dec 4, 2014 1:22 PM in response to Chachooga
    Level 8 (35,663 points)
    Mac OS X
    Dec 4, 2014 1:22 PM in response to Chachooga

    Use Contact/Address Book to print to Mailing/Avery labels or Envelopes in the print dialogue under Style > Layout.

     

    In every Application on the Mac you can print to PDF (button bottom left in Print).

     

    A good specific third party App is pearlLabelizer [free]. Also see what else you can find in the App Store.

     

    Peter

  • by peterehre,

    peterehre peterehre Dec 8, 2014 1:33 PM in response to PeterBreis0807
    Level 1 (10 points)
    Mac OS X
    Dec 8, 2014 1:33 PM in response to PeterBreis0807

    I think Sal Soghoian has done a great work to solve a little bit some of the missing features in Pages 5. But still Pages 5 is a product unworthy for Apple.

    For Sal, will it be possible to show the actual name of an placeholder on the screen before filling in the actual value. This will help a lot. Also if there would some where an indication for template with placeholders.

  • by Sal Soghoian,

    Sal Soghoian Sal Soghoian Dec 8, 2014 11:48 PM in response to peterehre
    Level 2 (176 points)
    Dec 8, 2014 11:48 PM in response to peterehre

    Although there's no command for "show placeholder" you can use coloring to reveal the placeholders in a document. Here's a simple script that will reveal all of the text placeholders in a document:

     

    tell application "Pages"

      activate

      tell the front document

      set the color of every placeholder text to "red"

      end tell

    end tell

     

    Change the color value to "black" to return the text to normal (assuming you're using black as the standard color)

first Previous Page 4 of 11 last Next