InDesign tip : #26

data merge — ooh, that sounds scary as hell — I’m not even going to think about looking at that.

… well, you probably should — there’s a pretty good chance you’ll have a use for it sometime. like scripting, data merge is just another way of automating a tedious, repetitive task. we’re going to use business cards as our example. first set up a file so it looks the way you want — this will be your basic template :
screen grab of business card layout

this artwork has a few elements that will stay the same across all cards and a few that will change for each card — a perfect job for data merge.
data merge relies on a well-constructed text file. the one for this job started as a spreadsheet that looks like this :
screen grab of spreadsheet of business card details

notice the top line has a label for each type of data element — this is important. that file was exported to a csv file, so it now looks like this :
screen grab of data from spreadsheet in csv form

back to InDesign now … open the data merge panel (in CS6 it’s under window > utilities >) and choose select data source from the dropdown menu to create a reference to your text file :
screen grab of data merge panel with dropdown menu

the data merge panel will now have a bunch of tags corresponding to the labels you created in your text file. add these tags to the relevant positions in your artwork. the easiest way to do this is to select the placeholder text in the artwork then click on the appropriate label in the data merge panel.
screen grab showing how to add tag to artwork
screen grab showing after tag is added to artwork

the preview check box will show you what the first completed card will look like. now you just need to save your template file then click the create merged documents button at the bottom of the panel. you’ll get a window like this to experiment with at your leisure :
screen grab of data merge options window

this will generate a new InDesign file with all your data in place — automatically creating as many pages as required (this example had seven lines of data in the csv, so seven pages were generated in the finished file) :
screen grab of one of the finished cards
awesome.

but that’s not all…
this method is great when it comes time to run out the next batch of business cards too. the text file appears as a link in the links panel of the template file. you can open, edit and update that file the same way as you would any other link :
screen grab of text file in links panel

then click create merged documents again and you’ve got yourself a whole new bunch of cards.

macgrunt icon

thoughtful and respectful comments welcome

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s