Join David Blatner for an in-depth discussion in this video Creating the template, part of InDesign: Data Merge and Database Publishing.
Now that your data is ready, you need to create a place to put it. A template that says exactly where each file should go on the page and how it should look. In this case we're starting simple and we're making name tags. And we happen to know that these name tags are going to be printed on some paper stock that we bought at the store. Now if you're luck you might be able to find a template on the web for the stock, but those templates are almost always for Microsoft Word. And not InDesign. So, let's go ahead and make our own template here. I'll start by making a new document.
Go to the File menu and choose New Document. These are name tags, obviously not a book or magazine so I'll turn facing pages off. I know that my template stock is letter sized 8.5 by 11 in the US, and I've used a ruler to measure the paper stock I'm printing on. And I know that the top and bottom margins should be one inch down from the edge of the page. So, I am going to unlink these margin settings and set the top and bottom to one inch. Now, as you'll see later, it's actually not important that you get the margins right at this stage, but, I find it helpful to think through right here in the new document dialog box if I can.
That looks pretty good, I'll click OK. And now we need to put stuff on our page. Even though we're going to be putting six name tags per page, we only want to make one right now. And Data Merge will do all the hard work of duplicating the one that we make. So I'll start by making a text frame. I'll use the type tool, and just drag out a text frame here. Doesn't really matter how big I make it or where I put it. And then I'll choose the Selection tool and I'm going to set the width to four inches and the height to three inches.
Now let's put some text in it. I'll go back to my type tool click inside of here and I'd like to use some dummy text to start with. And in general, it's a good idea to use some text that's long, like pick the longest name in your data. And you know I run indesignsecrets.com with Anne Marie Concepcion, right? So that's a long name. So that's one that I often use. So I'll just go ahead and type her name here and then I'm going to press a Return or Enter and type in my city and state. Let's say Chicago, Illinois. Now of course all of this depends on the data that I'm trying to display.
I might want to type a company name instead. The important thing is that everything we put inside this frame will show up on each name tag, just the way it appears here. So we have some dummy text, now let's format it. I'll triple click the name to select it and give it a different font, I'll choose Meriat font, let's say, Meriat Bold. I'm going to center it, let's make this bigger. About 30 points. Too big. 24 looks about right. Next I'll go to the Object menu and choose Text Frame Options.
Here, I can change my vertical justification to center so that all the text inside my name tag is going to be centered vertically. I'll also go up here to the Inset Spacing area, turn off this little link, and set the left and right to a little bit larger. Let's say ten points. That just ensures that none of my text goes all the way to the edge of the name tag. I'll click OK and you can see that everything is centered. Now, let's take care of the city and state. I'll triple-click that, center it, and let's make this a little bit bigger.
And you know, that's looking a little bit plain to me. Let's kind of spice it up by putting some text to the left and right of the city and state. I'll go to my Type menu, choose Glyphs, then I'm going to just move this out of the way, and scroll down my list until I see some ornaments. Actually, I'll go to the show pop-up menu. Choose Ornaments, that's just a fast way to show me all the little ornaments inside this font. And let's go ahead and add a couple of these. I'll double-click on that, click over here and double-click on that over here.
Let's add a little bit of space between here. These are just characters that I'm adding into my data. Now once we've done all this, we really should make paragraph styles for all of these. So let's go ahead and do that. I'll click inside this name up here, go to my Window menu, and choose Styles >Paragraph Styles. Let's create a new paragraph style for this. I'll call it Name. Click OK, and then assign it. Now, I'll click inside the city and state, do the same thing, but in this case, I'm going to turn on the Apply Style to Selection check box, click OK, and it makes the style and applies it automatically.
Now, while we're here, let's also make some character styles. For example for these ornaments. I'll select one of those ornaments, go to my Character Styles panel and choose New Character Style. Give that a name, apply it and click OK. And I'll do the same thing to this one over here. This name tag looks pretty good but now we need to add the data. So to add the data we need the Data Merge panel and you can find that by going to the Window menu scrolling down to Utilities and then choosing Data Merge. This is already getting messy.
So let's go ahead and close the Glyphs panel and the Character Styles panel. And we can focus just on the Data Merge panel. Now, the Data Merge panel is cool, because it's the only panel in InDesign that comes with its own step-by-step instructions, spelled out right here in the middle. For example, it says, step one, choose select data source from the Panel menu. Alright, we can do that. I'll go to the Panel menu and choose Select Data Source. Now I'll choose that CSV file that we created in the last movie. Click Open, and all that data shows up here inside the Data Merge panel.
So each of these names, first name, last name, group member and so on, each of those were the row headers in the data files, remember? I also want to point that in the upper left corner of the data merge panel, it shows the name of the data source. That data file that we created. Now that we've imported all that data, we need to put it into our template. To do that, I'm going to select the dummy text that I created and then simply click once on the field name. That added the first named field. Now I'm going to click after it with a type tool, press a space and then click on the last name.
You can see that the name of these two fields is even longer than Anne Marie's name. So this ends up looking pretty bad but that's okay. You just kind of have to ignore that. But if you want to see what it's going to look like with the real name in there. All you have to do is go down to the bottom of the Data Merge panel, and turn on the Preview check box. I'll turn Preview off again, and you can see it goes back to showing me the data names. Let's go ahead and add the data for these, as well. I'll choose the city, delete it, and then click once on the city field, and I'll choose the state.
Just delete that. Scroll down here, and click on state. Once again, I can turn the preview check box on or off. And we can see that it looks great. I'll turn Preview off, and now I'm going to save this file. I'll go to the File menu, choose Save As, and give it a name. It's also a good idea to save this an InDesign template, right here in the format pop-up menu. That way you can get back to the original file easily if something gets messed up. We're now ready for step three, merging all the data into our template.
- Understanding data merge
- Setting up the data
- Creating the template
- Building a merged document
- Adding images
- Updating the data
- Extending Data Merge
- Helpful third-party plugins and scripts
Skill Level Advanced
Q: This course was updated on 7/02/2014. What changed?
A: We added one new movie covering QR codes. David shows you the easy way to create dozens or even hundreds of QR codes with data from sources like Excel using InDesign's Data Merge feature.