To give you an idea how a simple variable data works, I'm
going to show you how you can create a series of postcards that are
going to be mailed out to recipients, and I can easily generate a
unique postcard for each person and put their name and address on it.
It's really pretty neat.
And, it uses a feature in InDesign called, data merge.
Now, keep in mind, for a really complicated project you're
going to use some kind of proprietary solution, such as XMPie.
But you can actually do a lot with the tools that are built right into InDesign.
So first, I need a record of everybody's name and address.
So, I've built that in Excel.
Let me show you.
So here in Excel you can see I have their address, the city and state.
When I scroll back to the left, you can see that I have
their firstname, lastname, and then the year and brand and model of their scooter.
Now, for this particular card this is one side of the
card the other side of the card I'm going to personalize later.
But this is just enough to get me the mailing addresses on one side of the card.
And it really beats printing labels and having to stick them on.
So, let's see how this works.
In InDesign I can't actually access this Excel file directly.
What I have to do is pull this data out
and save it as a CSV, a comma-separated value file.
But that's very easy.
It's just a File > Save As, and then
my format, is going to be Comma Separated Values, CSV.
Now I've already done that, so I'll show
you what that looks like, in a text editor.
And the comma-separated values means it, well it
separates the values in those columns with a comma.
Let's see what that looks like.
So here's the CSV file, I've got it open in a text editor.
And you might notice that in one line,
there's a segment here that's surrounded in quotes.
Why is that?
Well remember the C in comma separated values stands
for comma and you can see there is a
first name, last name and there is a comma
after each one and that's how InDesign interprets the field.
Well, here I have a comma in the middle of the address.
You will see that as a separator.
So, Excel is smart enough when I make the CSV file to surround that with quotes,
so it's seen as a literal comma not as a comma that's used as a separator.
It's really pretty clever.
So, let's see now how we can use this in InDesign.
So, in InDesign, I have a master page that has everything set up on it.
This is going to be the text field that contains the address.
So I need a way to bring in those fields and say InDesign, look at
these fields, pull the content out, and then
put it in order, and make my addresses.
And for that, I go to Window > Utilities > Data Merge.
And it's polite enough to tell you what to do.
You select the data source, you drag the fields from the panel to the frames on the
page, or put it into where an insertion
point is and then you create the merged document.
Sounds pretty simple, and actually it is.
So, from the Data Merge panel menu, as it suggests,
I select my data source and that's my CSV file.
And there's my CSV file.
So, I open that and look, immediately it populates
the Data Merge panel and there are all the fields.
Remember the names?
There they are.
So, what I'm going to do is just click in this text
frame and start dragging in what I want it to use.
So I want the firstname.
Now, I need a space between firstname and lastname,
so I just type a space, there you go.
Drag in lastname, hit Return, and then on the next line it's going to be
address, hit Return again and then city type a comma and a
space, state and a space, well maybe two spaces and zip.
So those little double brackets just say these are place holders for those fields.
And at the lower left of the Data Merge panel, I can
just click Preview and add these little navigators that I can use.
There's the first guy and as we go through you see what it's doing.
It's picking up those fields and it's populating.
Now, I'm just previewing right now.
I haven't actually generated a document with this.
So how do I do that?
Well, I go back to the Data Merge panel, and I choose Create
Merged Document, in other words, it's going to
merge that data, with this underlying document.
Now I could put multiple records on a page, that's nice
when you're doing something like printing name labels on one page.
But what I want is a page for everyone of these people with their address on it.
So that's the single record and that's the default.
All I have to do is click OK, and
I realize that any time an alert comes you're
afraid that something is wrong, this is actually good
news, it says well I didn't generate any overset text.
Well, why would it?
Well, what if my text frame weren't big enough
to accommodate somebody's very long name or very long address.
I might end up with overset text, so this is just a nice little confirmation.
Now those little colorful brackets that you see around give you
a hint that these are actually tags, it tags them as placeholders.
What if you don't want to see those?
Well you can go to View and Structure and choose Hide Tag Markers.
Although they're really pretty unobtrusive, but let's
see how this looks in its full glory.
So I am going to hide them.
And now when I go to page one, page two, page three, so
you can see I had six records and it's generated six unique pages.
And you might notice too in the title
bar, this is my original file this Postcard.indd
is actually made a new InDesign file, so it hasn't made any changes to my original.
So if I want to use that again in
the future that's great, I'll have a fresh start.
So it's made this new document.
If I save this and print it, I'm good to go.
So I think you can see how easy this is,
doesn't take a lot of work in Excel and Indesign, I
think makes it easy for you and it gives you a
good idea of the very basic concept of variable data printing.