automating layouts with data mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2...

16
17 Automating Layouts with Data Merge ONE OF THE CHALLENGES DESIGNERS ARE FREQUENTLY FACED WITH IS HOW TO produce a lot of work in a short amount of time. The phone rings. A potential client needs you to produce 400 personalized flyers for an upcoming adver- tising campaign—in three days. Not only that, the client wants it to look pro- fessional! It seems that clients have no problem asking for the impossible. Fortunately, you’ve read this chapter and are ready to take on the job, as long as the client can supply you with all the names and addresses in spreadsheet form. Thanks to InDesign’s Data Merge, you can make the impossible possible. Data Merge is a user-friendly database publishing solution that allows you to produce large volumes of work, such as business cards, mailing labels, person- alized form letters, and even simple catalogs, within a short turnaround time. There are many automated publishing solutions, but Data Merge is one of the simplest and least expensive—since you already own InDesign. Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Upload: others

Post on 12-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

17Automating Layouts with Data Merge

One Of the challenges designers are frequently faced with is hOw tO

produce a lot of work in a short amount of time. the phone rings. a potential

client needs you to produce 400 personalized flyers for an upcoming adver-

tising campaign—in three days. not only that, the client wants it to look pro-

fessional! it seems that clients have no problem asking for the impossible.

fortunately, you’ve read this chapter and are ready to take on the job, as long

as the client can supply you with all the names and addresses in spreadsheet

form. thanks to indesign’s data Merge, you can make the impossible possible.

data Merge is a user-friendly database publishing solution that allows you to

produce large volumes of work, such as business cards, mailing labels, person-

alized form letters, and even simple catalogs, within a short turnaround time.

there are many automated publishing solutions, but data Merge is one of

the simplest and least expensive—since you already own indesign.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 2: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Section 2 setting up indesign to do the work2

How Data Merge WorksUsing Data Merge is actually quite simple. To begin, you create a data source file, which contains the content for the documents you’ll be producing (Figure 17.1). The data source is often a database application, such as FileMaker Pro or Microsoft Access, but you can also create the file using a spreadsheet appli-cation, such as Microsoft Excel, or any text editor. The data is strictly textual information, which can include references to images, but there is no formatting applied to it. When the data source file is complete, you can reuse it again and again to produce any number of different publications.

The next step is to create a target document, which is an InDesign template that contains data-field placeholders and all the boilerplate elements that remain the same in each merged document (Figure 17.2). The formatting applied to each placeholder determines how the content coming from the data source file will appear.

Kerkwinkel Bookstore123 Everywhere Ave. Suite 000, City, State 00000

<<Customer Name>><<Address1>><<Address2>><<City>>, <<State>> <<Zip>>

Once the target document is set up, you can merge it with the data source file. During the merge, InDesign creates a new document based on the target document and replaces each data-field placeholder with the information from the data source file. The design is duplicated as many times as it takes to populate every record (Figure 17.3).

Figure 17.1 This data source file contains the names and addresses for a set of mailing labels.

Figure 17.2 The company name, address, and background art in this target document are boilerplate elements. The lines of text surrounded by double angle brackets are data-field placeholders.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 3: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Chapter 17 automating layouts with data Merge 3

Kerkwinkel Bookstore123 Everywhere Ave. Suite 000, City, State 00000

Ryan Williams2233 W Seventh StreetUnit 543Seattle, WA 99099

Kerkwinkel Bookstore123 Everywhere Ave. Suite 000, City, State 00000

Tara Cantrell eunevA kraP 1

New York, NY 10001

Kerkwinkel Bookstore123 Everywhere Ave. Suite 000, City, State 00000

Mitch Knapp yawkraP adniL amoL 56

San Jose, CA 94321

Kerkwinkel Bookstore123 Everywhere Ave. Suite 000, City, State 00000

Dave McNair89988 E 23rd StreetB720Oakland, CA 99899

Kerkwinkel Bookstore123 Everywhere Ave. Suite 000, City, State 00000

Richard Brown eunevA ts1 234

Seattle, WA 99876

Kerkwinkel Bookstore123 Everywhere Ave. Suite 000, City, State 00000

Mark Pearce teertS dn29 EN 56767

Seattle, WA 98009

Creating a Data Source FileA data source file is made up of fields and records. Fields are specific categories of information that form columns in a table, such as name, address, city, state, and zip code. Records are complete sets of information that form rows in a table (Figure 17.4). For example, if you’re mailing a package of promotional literature to 300 customers, your data source will contain 300 records. Each record would contain all the customer’s contact information.

Figure 17.3 The merged document. Data Merge can generate a single record or multiple records per page. In this example, multiple records are populating the page.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 4: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Section 2 setting up indesign to do the work4

Name Address City State Zip

Jane Smith 123 Memory Lane Los Angeles CA 90021

John Doe 3437 Hope Ave. New York NY 10017

Fields

Record 1Record 2

Data source files should be saved in a comma-delimited (.csv) or tab-delimited (.txt) text format (Figure 17.5). If the data is currently stored in a database, you can export it. Check your application’s user guide for more information on exporting to these formats. If you’re going to create the data source file yourself, the easiest way is to use a spreadsheet application, such as Microsoft Excel.

Comma-delimited file

Tab-delimitated file

To set up a spreadsheet file, first determine what fields are necessary to create the merged document and type them into the top row. Make sure the names mean something to you. For example, if you’re creating a small catalog for a hardware store, you might create the following data fields: Product Name, Description, Item Number, Weight, Price, and Unit.

If you want an image to appear with each product in the resulting merged document, you can also add an image field to the spreadsheet. To set up an image field, you must insert an @ symbol at the beginning of the field name. The subsequent lines in the column need to include the file name of each im-age. If the images aren’t in the same folder as the data source file, you’ll also need to include the complete file path to the image. The file paths must follow the naming conventions of your operating system (Figure 17.6).

Figure 17.4 Fields and records in a data source file.

Figure 17.5 In comma-delimited and tab-delimitated files, individual records are separated by paragraph breaks and fields are separated by commas or tabs.

● Note: After exporting data from a database application, make sure that your data source file contains the appropriate field names in the top row.

● Note: Some applications, such as Microsoft Excel, reserve the @ symbol for functions. So, you’ll receive an error message when you try to type the symbol at the beginning of a field name. Type an apostrophe (‘) before the @ symbol (such as ‘@Image) to validate the function.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 5: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Chapter 17 automating layouts with data Merge 5

Product Name Item Number @Image

Danger Red Flag 107958 C:\Documents and Settings\User Name\Desktop\Images\107958.TIF

Anchor Down 103942 C:\Documents and Settings\User Name\Desktop\Images\103942.TIF

Angle Clip 123293 C:\Documents and Settings\User Name\Desktop\Images\123293.TIF

A

Product Name Item Number @Image

Danger Red Flag 107958 Hard Drive:Users:Username:Desktop:Images:107958.TIF

Anchor Down 103942 Hard Drive:Users:Username:Desktop:Images:103942.TIF

Angle Clip 123293 Hard Drive:Users:Username:Desktop:Images:123293.TIF

B

Setting Up a Target DocumentWith the data source file prepared, you can set up the target document. The choices you make during its construction can lead to the success or failure of the merged document, so use the following steps to guide you through the successful completion of any target document.

Step 1: Set Up the Page Format

Optimize the page dimensions for the type of document you’re producing. For example, if you’re creating a mailing label and only want to print one label per page, the page dimensions should be the trim size of the label. However, if you’re printing multiple labels on a page, choose a page size that is large enough to contain all the labels.

For best results, deselect the Facing Pages option unless you want to set up duplicate placeholders on a spread so that one record will be repeated several times on the spread. It's also important to delete extra pages; otherwise they will become duplicated as well (Figure 17.7).

Step 2: Create a Sample Layout

This important step determines the appearance of the resulting merged docu-ment. Arrange all the sample text, graphics placeholders, and boilerplate ele-ments on the page. Create and apply any necessary style sheets. Also, make sure the size of each frame is large enough to handle the most amount of information it will contain. Otherwise, text frames may become overset and images improperly cropped.

Figure 17.6 Image references in a data source file using Windows naming conventions (A) and Mac OS naming conventions (B).

Figure 17.7 The results of a merged document when the target document contains an extra page.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 6: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Section 2 setting up indesign to do the work6

Step 3: Insert the Data-field Placeholders

Since the field names come from the data source file, you need to load it into the target document first. Choose Select Data Source from the Data Merge panel menu and locate a source file (Figure 17.8). A list of data field names appears in the panel. The icon to the left of each field indicates whether it is a text or image field (Figure 17.9). From this point on, the target document maintains a permanent link to the data source.

Now you can insert data-field placeholders in place of each element that will be getting its information from the data source. Keep in mind that you don’t have to use all the data fields in the Data Merge panel list. Only the fields you insert will be used to create the merged document. This allows you to use the same data source file for multiple layouts.

To insert a text data field, select some sample text and then click a field in the Data Merge panel list. The data-field placeholder appears, replacing any selected sample text. It is surrounded by double angle brackets, such as <<Product Name>>, and takes on the current formatting applied to the text (Figure 17.10). To insert an image data field, select a placeholder graphics frame and then click an image field in the panel list. If the frame contains a placeholder image, it will be deleted.

Figure 17.9 The loaded field names are identical to those in the top row of the data source file. The name of the loaded file appears at the top of the panel to indicate which data source the target document is linked to.

Figure 17.8 The Data Merge panel. Before you load a data source file, the panel displays instructions for using Data Merge.

● Note: While loading a data source file, you might get an error message stating that the data source has one or more empty field names. The file has empty columns (extra tabs or commas) that need to be removed before you can load the file.

n Tip: Need to know the location of the data source file your target document is linked to? Open the Links panel and double-click the data source link. The file path is located at the bottom of the Link Information dialog.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 7: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Chapter 17 automating layouts with data Merge 7

A B

Figure 17.10 The mock-up layout (A). The target document after the data-field placeholders have been inserted (B). Notice the dollar symbol ($) to the left of the price field. It has been set up as boilerplate text, since the data source file doesn’t contain dollar symbols.

Step 4: Choose Single or Multiple Records

When creating a merged document, you can generate a single record per page or multiple records per page. Your target document needs to be set up differently, depending on the option you plan to use.

If you choose the Single Record option, InDesign generates one page for each record found in the data source file, which is useful for envelopes and form letters. If multiple copies of the same data-field placeholder exist on the page, each instance will produce a duplicate record on the page, which can be useful for labels and business cards (Figure 17.11). If you don’t want duplicate records on a page, set up a single occurrence of each data-field placeholder.

If you choose the Multiple Records option, InDesign automatically generates pages containing multiple records, which is useful for simple catalogs. To use this option successfully, make sure only one occurrence of each data-field placeholder appears on the page (Figure 17.12).

n Tip: To quickly find out if duplicate data-field placeholders exist in a document, locate the field in the Data Merge panel. The page it’s on is listed to the right of the field’s name. If more than one number appears, a duplicate exists.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 8: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Section 2 setting up indesign to do the work8

Kerkwinkel Bookstore

Kerkwinkel Bookstore

Kerkwinkel Bookstore

Kerkwinkel Bookstore

Kerkwinkel Bookstore

Kerkwinkel Bookstore

123 Everywhere Ave. Suite 000, City, State 00000

123 Everywhere Ave. Suite 000, City, State 00000

123 Everywhere Ave. Suite 000, City, State 00000

123 Everywhere Ave. Suite 000, City, State 00000

123 Everywhere Ave. Suite 000, City, State 00000

123 Everywhere Ave. Suite 000, City, State 00000

<<Customer Name>><<Address1>><<Address2>><<City>>, <<State>> <<Zip>>

<<Customer Name>><<Address1>><<Address2>><<City>>, <<State>> <<Zip>>

<<Customer Name>><<Address1>><<Address2>><<City>>, <<State>> <<Zip>>

<<Customer Name>><<Address1>><<Address2>><<City>>, <<State>> <<Zip>>

<<Customer Name>><<Address1>><<Address2>><<City>>, <<State>> <<Zip>>

<<Customer Name>><<Address1>><<Address2>><<City>>, <<State>> <<Zip>>

A

Kerkwinkel Bookstore

Kerkwinkel Bookstore

Kerkwinkel Bookstore

Kerkwinkel Bookstore

Kerkwinkel Bookstore

Kerkwinkel Bookstore

123 Everywhere Ave. Suite 000, City, State 00000

123 Everywhere Ave. Suite 000, City, State 00000

123 Everywhere Ave. Suite 000, City, State 00000

123 Everywhere Ave. Suite 000, City, State 00000

123 Everywhere Ave. Suite 000, City, State 00000

123 Everywhere Ave. Suite 000, City, State 00000

Ryan Williams2233 W Seventh StreetUnit 543Seattle, WA 99099

Ryan Williams2233 W Seventh StreetUnit 543Seattle, WA 99099

Ryan Williams2233 W Seventh StreetUnit 543Seattle, WA 99099

Ryan Williams2233 W Seventh StreetUnit 543Seattle, WA 99099

Ryan Williams2233 W Seventh StreetUnit 543Seattle, WA 99099

Ryan Williams2233 W Seventh StreetUnit 543Seattle, WA 99099

B

Figure 17.11 Since multiple occurrences of this label were set up in the target document (A), the merged document contains duplicate records on each page (B).

A

2

TOOL

S

Builders Hardware

BOYD’S HARDWARE 2008

Danger Red Flag18” x 18” red polyethylene fi lm. Used to protect a customer¥s load. A requirement of State Highway Departments. 1000 per roll.

Item Number Weight Price Unit

107958 23.2 $124.99 roll

Silicone LubricantUsed as a lubricant for neoprene seals found on drop outlet, corners, and slip joints to ease the installation and allow for movement caused by expansion and contraction. (Estimated 10 bottles per 1000¥ of gutter - 10 bottles per carton).

Item Number Weight Price Unit

105781 0.25 $6.29 each

Garage Door Opener GreaseLubricates and protects the track slide and screw. Prevents rust and corrosion. Stops squeaking and sticking.

Item Number Weight Price Unit

105600 0.2 $3.79 each

Carriage Nuts And Bolts1/4”-20 wafer head carriage bolts and hex nuts. Used on wood garage doors. 12 per card.

Item Number Weight Price Unit

103675 0.43 $2.29 pack

Dead Bolt Rim CylinderReplacement cylinder with 2 keys for model No. N280784. For dupli-cate keys use Schlage model No. SC1 key blank. Chrome fi nish.

Item Number Weight Price Unit

103683 0.32 $5.29 each

Ribbed Nuts And Bolts1/4”-20 slotted rib neck bolts and hex nuts. Use on fi berglass garage doors. 12 per card.

Item Number Weight Price Unit

103888 0.24 $2.29 pack

All-Purpose Framing AnchorManufactured of 18-gauge galvanized steel. Uses include anchoring rafters and trusses to plates, fl oor and ceiling joists to headers, and solid blocking to plates. Fabricated with special <i>slots</i> to permit accurate bending on the job site. Each angle

Item Number Weight Price Unit

105558 0.21 $0.49 each

Anchor DownManufactured of galvanized steel. For use on shear walls and vertical posts. 8-1/8” H. x 2-5/8” W. x 2-3/4” D., 12-gauge.

Item Number Weight Price Unit

103942 1.04 $7.29 each

Angle ClipModel No. A3: 18-gauge. Eliminates toenailing and increases strength. Model No. AC series: 16-gauge. Features staggered nail pat-terns which reduces wood splitting and allows installation on both sides of the supported member. G90 galvanizing. TZ indicates

Item Number Weight Price Unit

123293 0.44 $0.89 each

AngleManufactured of 18-gauge galvanized steel. Designed for general utility wherever wood-to-wood connections are involved. Dimen-sions: 1-3/8” W. x 2-13/16” L.

Item Number Weight Price Unit

102668 0.06 $0.39 each

Column BaseFor support of heavy load-bearing column base connections. 3/16” steel painted with corrosion-resistant primer.

Item Number Weight Price Unit

111449 7 $11.49 each

Corner ReinforcementMultipurpose braces are designed to provide reinforcement for 90∞ wood-to-wood connections. 12-gauge. Finish: G90 galvanizing.

Item Number Weight Price Unit

111309 0.55 $2.99 each

BFigure 17.12 This catalog template was set up to take advantage of the Multiple Records option (A). Each record appears only once in the resulting merged document (B).

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 9: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Chapter 17 automating layouts with data Merge 9

Step 5: Place Objects on the Document Page or Master Page

You can place boilerplate elements and data-field placeholders on the document page, master page, or both. The choices you make are determined by the layout you are creating and the results you want to achieve in the merged document.

When you place objects on the master page, you have a few advantages that are not available if you put them on the document page:n The resulting merged document contains the original placeholders on its

master page and includes the merged results on the document pages as overridden master items. You can then globally update the document with a change to a master item.

n The merged document maintains a connection to the data source (Figure 17.13). If any records are modified in the data source file, you can update the contents of the merged document by choosing Update Content in Data Fields from the Data Merge panel menu.

However, if you’re going to merge multiple records, don’t place everything on the master page. Otherwise, each object will be duplicated and arranged on the document pages according to the Multiple Record Layout options found in the Create Merged Document dialog. This includes any boilerplate design elements, such as background art, rules, and so on (Figure 17.14).

Figure 17.13 After the merge, nonprinting color-coded brackets appear around the text elements that are linked to the data source file. Frames that contain the linked data are also assigned a color.

n Tip: Choose View > Structure > Show Tagged Frames to view the color-coded brackets and frames.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 10: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Section 2 setting up indesign to do the work10

To prevent this from happening, place just the variable content on the master page and all the boilerplate elements on the document page. Another option is to place the variable content on the document page and the boilerplate ele-ments on the master page. But if you use this option, the merged document won’t maintain a connection to the data source.

When generating a single record per page, you can place everything on either the master page or document page. There is no difference in the merge results.

Step 6: Clean Up the Target Document

It’s important to clean up the target document before you create a merged document to ensure successful merge results. The following tasks will ensure a clean document:

Figure 17.14 This layout was produced using the Multiple Records option. As a result, all the objects on the master page were duplicated and repositioned on each document page.

● Note: Don’t place data-field placeholders on both master pages and document pages; otherwise, InDesign cannot merge or preview the document.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 11: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Chapter 17 automating layouts with data Merge 11

n Remove any unnecessary objects from the document, including unused empty frames, objects on the pasteboard, and anything else that is not part of the final layout.

n Delete all the pages in the document except for the first page; otherwise, each extra page will be duplicated in the merged document and you won’t be able to merge multiple records.

n If you’re going to merge multiple records, it’s important to delete any extra data-field placeholders from other master pages; otherwise, the merge results will be totally unpredictable.

n If a master page contains data-field placeholders, you must apply that master page to the first page of the document to merge properly.

Step 7: Test the Merge Results

With the target document formatted and the data-field placeholders in place, you’re technically ready to merge the information from the data source with the target document. It’s important to test your solution before launching the final template to make sure that field data will appear properly when the information is merged.

To test your target document, click Preview at the bottom of the Data Merge panel, or choose Preview from the Data Merge panel menu (Figure 17.15). InDesign displays actual data from the data source file instead of the data-field placeholders. To navigate to a specific record, click the navigation buttons at the bottom of the panel. You can also type the number of the record you want to preview in the navigation field at the bottom of the panel, and then press Enter/Return.

A B

Figure 17.15 Previewing the merge results with the Data Merge panel (A). InDesign previews only one record at a time when the Preview command is used (B).

n Tip: Need to re-sort the order in which the records appear on the page? Since Data Merge can’t sort data, open the data source file, re-sort the records, and then update the data source in the target document.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 12: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Section 2 setting up indesign to do the work12

When previewing the merged document, look for records that don’t fit the frame you’ve created, such as a long name you didn’t anticipate. Look for other errors in the data as well, such as typos, typographical errors, and extra spaces. If you find problems with the layout, you can edit your design while previewing the document. However, if there are problems with the actual data, it’s best to edit the data source file before generating the final merged document.

Updating and replaCing the data SoUrCe

While testing your target document, it’s likely you’ll run into unintended prob-lems with the data. For instance, you may need to correct a few typographical errors or modify a file path that is referencing a missing image.

Once you fix the issues and save the data source file in the comma-delimited or tab-delimited format, you can update the data source by choosing Update Data Source from the Data Merge panel menu. The changes will be reflected in the document after updating. Click Preview again to see the new changes.

At times you might need to replace the current data source file with another one. For example, if you have three files that contain the names and address for three different companies, you might link to each file to test the merge re-sults for all three of them. To link to a new data source file, choose Select Data Source from the Data Merge panel menu, and then locate the new data source file. Only use this option if the data fields match those already in the target document; otherwise, you’ll have to insert new data-field placeholders.

Step 8: Set the Merged Document Options

It’s important to predetermine how the merged document will be created by setting the merged document options in the target document. This way you won’t have to go through all the options again when you generate a merged document.

With the target document open, click the Create Merged Document button at the bottom of the Data Merge panel or choose Create Merged Document from the Data Merge panel menu. Specify the settings in each tab as follows:n Records tab. Choose the Single Record or Multiple Records option from

the Records per Document Page menu, depending on the type of docu-ment you want to produce (Figure 17.16). Select Generate Overset Text Report with Document Creation to automatically open a report that tracks overset conditions created during the merge (Figure 17.17). If you want InDesign to display a missing link alert when one or more images are not available, select Alert When Images Are Missing.

● Note: Don’t confuse the Update Data Source option with the Update Content in Data Fields option, which is only available in a merged document if the original data-field placeholders are positioned on the master page.

● Note: The overset text report does not include text that is overset in table cells.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 13: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Chapter 17 automating layouts with data Merge 13

Figure 17.16 The Records tab in the Create Merged Document dialog.

Figure 17.17 The overset text report displays each overset instance in a numbered list showing the page number the text appears on, followed by an overset character/word count and a snippet of the overset text. Choose Save Report to save the information to a text file.

n Multiple Record Layout tab. The options in this tab control the arrange-ment of records on the page for multiple record layouts (Figure 17.18). To make the settings available, you must first select the Multiple Records option in the Records tab.

Figure 17.18 Previewing the merge results for a multiple record layout with the Create Merged Document dialog.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 14: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Section 2 setting up indesign to do the work14

Begin by selecting Preview Multiple Record Layout at the bottom of the dialog so you can preview the results as you change the settings. Use the navigation buttons to navigate through the pages or type a number in the navigation field to locate a specific page. Type values into the margin fields to specify the distance between the margin guides and the edges of the page. Choose whether you want the records arranged by rows or columns and specify the spacing between the columns and rows. You’ll probably have to try several options until you manage to fit everything on the page properly.

n Options tab. The settings in this tab allow you to specify content place-ment options, which determine how variations in the data are handled (Figure 17.19). Choose an option from the Fitting menu to specify how the incoming images will fit within the placeholder graphics frames. If you want to align the center of the image to the center of the frame, choose Center In Frame. Select the Link Images option if you want InDesign to create a link to the original image file. If this option is not selected, all im-age data is embedded in the InDesign document.

Choose Remove Blank Lines for Empty Fields to remove extra paragraph returns caused by empty fields. This option is useful anytime an optional field is used in the layout and the field is empty in some records (Figure 17.20).The Record Limit per Document option is useful when your data source file contains a lot of records and you don’t want to create an InDesign document

● Note: If the specified space between columns or rows forces records to move beyond the margin guides, the records will disappear from the layout.

● Note: Choosing Content Placement Options from the Data Merge panel menu gives you the same options located in the Options tab of the Create Merged Document dialog.

Figure 17.19 The Options tab in the Create Merged Document dialog.

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 15: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Chapter 17 automating layouts with data Merge 15

with too many pages. Specify the maximum number of records allowed for each merged document. During the merge, a new document is created each time the threshold is reached until all the records are merged. This option is available only when the Single Record option is selected.If the Multiple Records option is selected, the Page Limit per Document option will appear instead of the Record Limit per Document option. Specify the maximum number of pages allowed for each merged document. During the merge, a new document is created each time the threshold is reached until all the records are merged.

A B

After you’ve set all the merged document options, click OK to create a merged document, and then return to the original target document and save it. Once you save the document, the specified merged document options will be used from then on to create merged documents. You can save the target document as an InDesign CS3 template, but it’s not completely necessary since a new document is created during the merge anyway. However, if you plan on using different data source files to create multiple versions of a document, save the target document into the template file format so you won’t accidentally modify the original template.

Generating a Merged DocumentWith your data source file ready and your target document complete, you are ready to create a merged document. Click the Create Merged Document button, specify how many records you want to generate, and click OK. A new document is created according to the merged document options, and each data-field placeholder is replaced with actual data.

Figure 17.20 This target document contains an optional address field (A). Since Remove Blank Lines for Empty Fields is selected, the paragraph is automatically deleted if the Address2 field is found empty in a record (B).

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.

Page 16: Automating Layouts with Data Mergeptgmedia.pearsoncmg.com/imprint_downloads/peachpit/... · 2 Section 2 setting up indesign to do the work How Data Merge Works Using Data Merge is

Section 2 setting up indesign to do the work16

After generating a merged document, you can change its layout and still update the content in the data source file. To update the merged document with any new changes made in the data source, choose Update Content in Data Fields from the Data Merge panel menu. The layout will remain the same, but the data within each color-coded bracket will reflect the new changes. This op-tion is only available in a merged document in which data placeholders are positioned on the master page.

The changes that have been made by updating the data fields appear in a log file if Show Log of Update Results was chosen from the Data Merge panel prior to updating the content.

Data Merge LimitationsData Merge is useful for creating highly structured documents, but it’s not well suited for complex layouts. For example, it doesn’t support the creation of facing page layouts. You also can’t build intelligence or rules into the process, so there isn’t much room for variation in a layout.

Another major feature that Data Merge lacks is the ability to flow multiple records into one long text frame (story), which is necessary in catalog produc-tion. Instead, each populated occurrence of a record is a stand-alone duplicate of the original placeholder elements. You can’t add new records, and when you delete a record, an empty hole is created. You are forced to create a new merged document each time the number of records changes.

However, when you want to automate simple layouts and don’t need the so-phistication of specialized plug-ins, Data Merge is an excellent solution.

third-party database publishing plug-ins

a lot of the shortcomings found in data Merge can be overcome by using a similar, yet more robust solution. here are a few plug-ins created by third parties that turn indesign into a page production machine:

n EasyCatalog (65bit.com)

n LiveMerge (www.cacidi.com)

n DataLinker (www.teacupsoftware.com)

n InData (www.emsoftware.com)

● Note: The Update Content in Data Fields command works best when you’ve made simple edits to the data source file and want to update existing records in the merged document. If you need to add new fields or records, generate a new merged document

Excerpted from Instant InDesign: Designing Templates for Fast and Efficient Page Layout by Gabriel Powell. Copyright © 2008. Used with permission of Pearson Education, Inc. and Adobe Press.