Join Claudia McCue for an in-depth discussion in this video Using InDesign Data Merge with images, part of Print Production Essentials: Digital and Variable Data Printing.
- View Offline
InDesign's data merge feature also lets you incorporate images. But there are a couple of little tricks you need to know. These first columns are just going to indicate text, that's going to populate areas in text frames in InDesign. This last column is how I inform InDesign of a directory path to the images I want it to use as part of data merge. The way I have this set up is with relative links. So in other words, InDesign is going to look down one level into a links folder. In there, it's going to find the images. There's also a way to set up absolute directory paths.
Why would you want to do that? It's a lot more typing, and you have to figure out the convention for your particular platform. I'll show you that there's a way in InDesign to find that complete path, and it's actually pretty easy. But the reason you might want to use the absolute path rather than the relative path is you might have a common repository of images that you want to use. But your InDesign files are stored in multiple locations, and so it's a challenge to move those images. And, you don't want to mess up your housekeeping there. So, I'll show you a way to set that up, but this is certainly an easier way.
And, for the exercise, I think you'll appreciate the fact that it's an easier way. But here's one of the tricks. You need to put something special in this header to inform InDesign that this is a direct repath to images. It needs to say at sign, image. So I type in at sign, type image. But, when I hit Return, Excel isn't going to let me do that. It sees that at sign as a special character, not as a literal at character. But I can change that. All I have to do is click before the at sign and put in an apostrophe. So just type apostrophe at and then the world image, and you'll be good to go.
And then ,remember that InDesign can't access this Excel file directly. I have to save this as a CSV file, which I've already done. So let's jump over to InDesign and see how we use this. Here in InDesign, I'm on my master page. And I have a frame that's going to be the frame that holds all my images that I bring in. But I'm going to change the fitting values for this frame so that InDesign knows how to size them and crop them. So I'm just going to right-click, choose Fitting > Frame Fitting Options. I'm going to choose to fit content proportionally.
And that way, I'm ensured it's not going to crop anything off and it's not going to distort it. And I want it to pivot from the center. So I click OK. You didn't see anything change, but it's going to make things easier. I'm not going to have to resize my images after it generates all of these pages with the images on them. So now, it's time to bring in that data. And I said I would show you how to do a directory path. What you do is you make a little frame, just for temporary purposes, and place any image really from the directory that you would be pulling from. So I'm just going to arbitrarily pick something on my desktop.
And then in the Links panel, I have this selected. And I can go to Copy Info > Copy Full Path. And I can even say, Copy Platform Style Path. And that's the one you want. It doesn't do anything. But now if I scroll out here, and I can just make a little text frame, again, for temporary purposes, and paste. And this is the complete path to that image. So if you were creating a project where you have to use that absolute path, this is what you have to put in your Excel file.
And don't forget to that add image at the top. See how I made it easy by using relative paths? You might choose to do that too. So now it's time to invoke that data source. So I'm going to go to Window > Utilities > Data Merge. I select my data source, which I'd already saved. And I made a Windows and Mac version for you because the little back slashes on Windows and Mac are different. And when I hit Open, there we go. Now all I want in here is the first name. So I'm just going to make sure that there is a space in between.
And might need to clean up a little bit here. There we go. Type a space, drag in first name, and there we go. Now, it's a big, long placeholder, but here's something you need to think about. If somebody has a really long name, you may have to change the size of your text to accommodate it. So, it's a good idea, especially if you're familiar with that data source. Find the longest name or whatever data entry there is, and sort of reverse engineer and build your text frame to accommodate that. And then, here comes my image. And there we go. So now, let's do a preview.
And as I go through, you can see the name, and the scooter is going to change. Isn't that cool? So, really, the only tricky part of this setup is to remember that apostrophe and then at sign. And now, let's generate that merged document. So when I choose Create Merged Document. And again, this is a single record approach. Each page is going to be a single record. So I'm going to click OK. Again, this is good news. It says I didn't have a name that was too long and I didn't have to overset any checks. So this is great. And now, when I go through, because I built it on the master, each page has the scooter and the name.
And these little extra dots that you see are part of bringing in that data. Now here, there's actually a line in the text file that I didn't need. So, it's generated some things that I didn't need. So it might be a good idea to take a look at that text file. So let's do that. So, here I am in the text editor, and there's some junk at the end. So, that's how I ended up with those extra spaces. So, if I want to clean it up, that's easy to do. And by the way, the at sign trick that I showed you earlier, what I could have done as well as just type the word image in Excel. And then, when I export it to my CSV file, I can just come in here and type in at, at the top, that will work too.
Either way, this is the result that you want. I'm going to save this file. And now, when I go back into InDesign, if I needed to clean this up, I could. But frankly, the easy way to do that is just select these two extra pages that I don't need and just get rid of them. But isn't that cool? For just a little bit of entry of text in Excel, I now have this semi-automated process that generates all of these customized versions of my little postcard that I can send out. I just think this is really fun.
- What constitutes "digital printing"?
- Printing short runs
- Working with digital color and large-format output
- Using InDesign's Data Merge feature to format variable data
- Printing on ceramics, metal, and wood