The Data Merge function takes information from a tabbed text or comma-delimited file and imports it into InDesign to create documents with specific, different information. Again, I'll use an example.
My bakery newsletter has become very popular, so not only do I hand out copies in my shop, I also mail it to customers who can't make it in regularly. I've tried creating mailing labels with label software, but it's hard to line those darned things up, and besides, I'd like the name and address information printed right there on the newsletter.
If you have character or paragraph styles already set up in your end document (that is, the document you are dropping the tags into), you can map the tags you import to those styles. In the fly-out menu on the Structure pane, select Map Tags to Styles. A dialog opens that enables you to select a style for each tag you are placing.
I have an Excel file with all of my subscribers' names and addresses typed in it. I set up my Excel file so that the subscriber's first name is in the first column, the last name is in the second column, the street address is in the third column, city is in the fourth, state is in the fifth, and ZIP code is in the sixth. In Excel, I select File, Save As and, in the Format pop-up menu, I choose Text (Tab delimited) or CSV (Comma delimited). I can now import the text into my InDesign document. To do this, I use the following steps:
The information in the Excel file is merged into the newsletter file, and you can now save and print the InDesign document with all data in place.