Data Merging - Part 3
It’s been much longer than I expected finishing this three-part tutorial on InDesign’s Data Merge feature, but it’s been a very busy period for me. You’ll find part 1 here, and part 2 here. When I left you, I had created a reminder card layout in InDesign CS2, and created text and graphic frame placeholders. I selected the data source and linked the data fields with the placeholder frames. Finally, I previewed the result.

ReminderCardLayout
Now, it’s time to create the new data merge document. Click the Create Merged Document button (circled above), or choose Create Merged Document from the palette menu. This opens a three-tabbed-panel dialog box. The most important panel—Records—is where you select which records you want to include in your merged document. But equally important, you need to choose the number of records per document page. (This choice has tripped many people up.)

Select records
The layout we’re creating is a Single Record. That is, it creates exactly one physical page for each record in the merged document. (Remember, from our first posting, that a record is the complete set of fields that extend across the row of data. We’ll show you a Multiple Record layout next.) There are also options to generate a report if text gets overset in the process, or to generate an alert when images are missing.
You also want to click on the Options tab. Here you have choices for how to fit images in your graphic placeholder frames. (I prefer to presize my images to exact size ahead of time by running an action on the images in Photoshop.) You can also remove blank lines for empty fields or set a maximum number of records in a document. When you’re finished, click OK.
InDesign starts thinking about what to do. For a large data merge, this can take quite a while. Finally, it generates a new document containing the records you selected. As you can see in the illustration below, there was no overset text, and seven pages was generated in my simple example.

New Document Generated
Multiple Record Layouts. Now let’s show you an example of a Multiple Record layout. This is an imaginary examination certificate which will be printed 4-up on a page.

Certificate
I find it helpful to create guides to help me figure out how to position the 4-up layout. When you create the Multiple Record layout, you only place boilerplate and placeholders on the layout once. You’ll position the other records using the Create Merged Document dialog box. (You can also place data-field placeholders on a master page.) When you click the Preview, you’ll only see a preview of the first record. Click the Create Merged Document button to open the dialog box.
This time, in the Create Merged Document dialog, choose Multiple Records in the Records per Document Page popup menu. Now the Preview Multiple Record Layout becomes available at the bottom of the dialog box. Don’t worry if things aren’t lined up the way you want. Click on the Multiple Record Layout tab to fix that.

Multiple Record Layout
Here is where you position the other instances of records which will appear on the same page. You’ll need to tweak the controls in the Layout of Records section to position the other records. This is where having the guides on the page helps you to position the elements more precisely. When finished, click OK to generate your new merged document.
There are a lot of other fine points which could be added here, but this blog entry is long enough already. Continue to leave your comments here on your experiences using Data Merge. It’s not a perfect solution for all data needs, but it’s helpful for simpler layouts. And it’s free!

Steve, that was a great series! Thank you so much for contributing that…. I have a feeling it will be linked to for months to come.
As you said, “there are a lot of other fine points which could be added here.” I don’t have any fine points to add at the moment, but a few general comments about tips and gotchas.
1. The one thing that Data Merge won’t do that everyone wants/expects it to do is to work like Word’s Mail Merge … that is, to be able to create one long text frame (story) containing multiple records. It’s a frustrating fact of life that every record will be contained in a stand-alone dupe of the original placeholder frame(s). A single page sheet of 30 mailing labels will be made up of 30 separate, unthreaded text frames. If you need all those records merged in a single story, you could use Word to do the merge, then place the file in ID.
2. If you put your placeholder frame on the Master Page (did you cover this? I’m not sure) instead of the document page, you get some advantages; notably being able to choose Update Content in Data Fields from the palette menu when the data source has been changed. Instead of starting over from scratch, Update Content does just that, including adding any extra records that may have been added.
3. Another sad fact of life is that DM can’t create facing pages documents. Even if you start with a facing pages doc, the merged doc will be a series of single, right-facing pages. (So if you’re putting placeholders on the master as in #2, be sure to put it on the right-hand side of a facing-page master. Stuff put on the left-hand page will end up on the left pasteboard.)
AM
Anne-Marie,
Regarding your third comment, this also means that creating recto-verso badges is impossible with the Data Merge feature ! We noticed that last year during a training.
Also with regard to the first and third comments, if you want to see an Excel spreadsheet, a Word mail merge document and Indesign layout used together, go to http://www.coldwars.org/documents/ConventionProgramBook2007.pdf
Each of the three days of event listings is a single story, the Friday event listing consisting of over 160 separate records (all of varying length), the Saturday list composed of over 190. I’d say about 90 percent of the event listing formatting was generated automatically, using the particular strengths of each program.
Regards,
Mitch Osborne
Thanks so much for this series! I had no luck with XML and was about to buy a $500 plugin (inData) but this showed me exactly what I needed.
Anne Marie - when I was doing a multiple records per page document I put the placeholders on the master page and found that although the records previewed correctly - the final outputted file was messed up. When I moved the placeholders to page 1 it solved it, so there is something funny there.
As I understand it CS3 will have better XML import including conditional rules etc so that will be interesting
Thanks for this series. It’s a huge help to get us newbies started!
Just wondering - is there a way to transfer text with line breaks from a field into a placeholder? I’m working on a customer report, where sales reps provide commentary that is unique for each report. Unfortunately I can’t seem to find a way to carry over line breaks for new paragraphs within that commentary automatically. Any suggestions?
Heather, I’ve found that a soft return works ok. In the past I had to delete the returns all together and rebreak once the data was flowed. I’m interested in other suggestions as well.
What files are delivered to the printer? Do you zip up your native files with the data and hope everything works out at the print shop? Or does one furnish all the PDFs to run all pieces?
Larry, it depends on what your printer requires. I very rarely send native InDesign or image files to a printer anymore. I just send PDF files.
I am trying to use data merge to automate the creation of calendars, date numbers are in one Excel spreadsheet, holidays text in another. All works well when I bring the data in for say the date numbers, into a table of 40 or so cells (I use tables to insure the position of the text and numbers.) on to a layer.
The problem arises when I try to bring the holiday information in onto another layer of table cells, when merged they all revert to the numbers on the previous layer.
I read that only one data source can be used per merge document (pre merge), is there a work around for this?
I would appreciate any ideas for auto generating the calendar creation, otherwise it must all be done one cell at a time more or less.
Thanks,
Carl
Great article! Came in very handy making 8-up cards with a unique beta code key for testing a new subscription based web site.
Johnny come lately. Doing my first data merge project. Far easier than I anticipated but I still have a few questions.
1) How do you make the images center in the box. Not all my imported images are the same exact size. Do I constrain the box in ID to the same size as PS file? I’m using a small source file (5 entries) to learn and the images, especially the logos, aren’t in a consistent position.
2) I intend to do a series of postcard mailings for myself. 4-up. When I use the multiple-entry-on-page option will the job back up correctly? The Vet Hospital sample is one sided, AFAIK.
3) I do lots of newsletters. This year, several of my clients want me to handle the mailing in addition to print. I want to address and bar code the job on the fly. I know I have to CASS certify the list prior to addressing but I would love to not have to print newsletter and address and then have to use an addressing system. One of the biggest issues is that if I have 400 20-page newsletters, I don’t want a million page ID file when the merge is done. I’ve already assumed I can do the cover (the part that gets addressed) as a separate print run and have the printer pull the cover. Lastly, I also get newsletters designed by clients as PDFs and would like to figure out how to merge onto those. Thanks in advance and sorry to be so long!
Great tutorial, the only problem that I have with inDesign and merging is that it doesn’t seem to suit the mass-mailing I’m working on. I have a 4 page letter that I need to send to 36,000 names. The names are inserted at various places through out the 4 pages. Merging a document for 400 names takes about 25 minutes (on a Dual G5) to create, I can only imagine how long it will take to create a file for all 36,000! I gave adobe a call and they say that’s how long it takes :(. It would be nice to have a better solution. If anyone knows, please I would appreciate the suggestion!
Jeremy,
That’s because you’re attempting something much beyond the capabilities of Data Merge! You need to look at variable data software. Here’s a link to the Variable Data Publishing page on the Adobe website which lists software that’s more appropriate (and expensive):
http://www.adobe.com/products/vdp/
Steve:
Thank you so very much for the detailed description of the multiple record mail merge. And the most crucial piece of info “When you create the Multiple Record layout, you only place boilerplate and placeholders on the layout once.” Again, Thank You!
Thanks for the info on Data merge. I’m trying to merge, print and mail about 2500 4-page newsletters (the only data I’m merging is for the address section). I tried to merge all of them and froze up the computer. Any suggestions (other than purchasing more software) on a way to merge that many names at once without crashing my PC or creating a massive ID file?
The Multiple Records per Document feature simply isn’t working for me. I’ve one placeholder box set up and set my offsets and choose everything collectly but instead of getting the multi records per page as shown above I get a multi page document with one one record per page, in the same place as my place holder. What’s going on? Any ideas? thanks.
This funcionnality is very interresting on Indesign. But do you kno a way to send the document directly to the printer without creating a new page for each entry of the database ? For example, I have a booklet for print, with the name of the receiver on the first page. I must send to the printing copier job by job cause I I send all the job it will assemble all the job together (the all stapled together). Thanks
thanks a lot for this article, is somebody konws about some hidded features allowing for example to make some page break by adding a special caractere in the CSV file ? It would be great
I can’t merge a multi document to make columns on each side!! Eek Help!
m am not able merging for 1000000 datas how i can merge bulk of data . .plz give hints
Prashant, I would never try to use data merge for that many records. Data Merge is for small jobs. It is not “industrial strength.” You should look for other database publishing plug-ins to do large-scale work.
Was this question ever answered cause I am having the same problem. The Multiple Records per Document feature simply isn’t working for me. I’ve one placeholder box set up and set my offsets and choose everything collectly but instead of getting the multi records per page as shown above I get a multi page document with one one record per page, in the same place as my place holder. What’s going on? Any ideas? thanks.
Kate, the datamerge function in InDD is VERY picky. I find that sometimes the Multiple Records functionality is disabled if 1) the data source isn’t a .csv file or 2) if the InDesign file has more than one page in it, or 3) if you’re merging onto the masterpage, or 4) if the data source has multiple worksheets. I have been merging in a new blank indd document, then stitching the text boxes together using Active Page Item (API) text stitch plug-in, then copying it all and bringing it into my working document. Keeping the datamerge out of my working document keeps it much cleaner. Hope that helps.
I’m trying to figure out if indesign will let me populate a table using the merge function. I can’t seem to get the data to populate cells (I tried highlighting, as well as creating a table that could be duplicated) anyone know if this is even possible, or am I left with simply importing tables from a word doc or spreadsheet?
Thanks in advance for any insight.
the_knee
the_knee,
I seriously doubt that the Data Merge field can populate a table. You should import tables from Word or Excel.
I have a time crunch issue. I have never merged in Word. I have been given the task of learning how to merge in In Design. I have everything set up and all is OK. I have to put 2 different name fields on one page, thus, a multiple record. I can get the same name twice on one page and the 2nd page has the 2nd name twice.Thank you for having this information available and written so a newbie like me can understand it.
I too am curious if this would work for tables as well. Unless I am missing something, I can’t find a way to style a table in advance and have the resulting placed table just poulate — I have to manually tweak every table I import (column widths etc.).
I have set up cell/table styles (and also Paragraph Styles for the content text), but these do not seem to allow me to control the column widths/spacing.
I was hoping Data Merge would be an alternative.
@George, no, unfortunately Data Merge is not really set up to work with tables.
Egads - I love Data Merge but have one problem. The document is a class schedule. While the frames stay in the same layout / design, the records vary in length.
One class description record may be short while the next class description record may be long. How do I set data merge to automatically resize the data merge field / frame to the appropriate size?
If we can get the frames to resize to fit the text, then my work productivity will be at an all time high. Whoo Hoo!
Hi,
This tutorial was really helpful, thanks for that.
I have been experiencing some problems though.
When adding pictures to a frame, keeps giving me following warning:
” The data source references one or more missing images. The missing images cannot be previewed or merged. …”
I can take another picture, in the same folder (same path), with a different name. Some pictures work, some don’t. (actually most of them don’t work)
path:
:Users:wannes:Desktop:2.jpg works just fine
:Users:wannes:Desktop:1.jpg gives error
and i am sure files are in this folder, carrying the right name.
Can you help me on this topic please?
Hans from belgium
Hello,
I have successfully merged an excel spreadsheet into InDesing. However, once I hit preview, it shows the name of the field but does not display its value. The page says no errors. I am really frustrated because every time I check preview, a different variable will only show the name and not the value.
Any ideas? please help!
robert