Free

Free coded apps to suit all. No sign up, no email, usable offline, updates when I can, feedback welcome. Send feedback

How-to

How to do a mail merge with pictures in Layout

Data merge in Layout by Zaweba fills text, picture, QR and barcode fields from CSV, TSV or spreadsheet files, with several records to a page if you like.

How to do a mail merge with pictures in Layout

Data merge in Layout by Zaweba fills a template from a CSV, TSV or spreadsheet file (.xlsx, .xlsm or .ods), and its fields can hold pictures as well as text. Add a column in the data that names each record's picture, set a picture field in the template, and every merged record shows its own photo. QR codes and barcodes can be fields too, and you can put several records on a page.

Mail merge is usually thought of as letters with names in them. With pictures, it becomes a way to make name badges with photos, staff cards, property sheets, event passes, product labels and anything else where the design stays the same and the content changes.

What you need

You need a data file with one row per record and a header row naming the fields. Plain CSV or TSV works, as do .xlsx, .xlsm and .ods spreadsheets. For pictures, one column holds the reference to each record's picture file. Keep the pictures together in a folder, named clearly, so the references stay simple and nothing goes missing.

You also need a template: a Layout document with the design for one record, with frames where the merged content will go.

Building the template

Design one record as it should look, using real sample content so you can judge the spacing. Then replace the sample text with text fields and the sample photo frame with a picture field. Set the frame's fitting options before merging, so every photo is treated the same way, filling the frame proportionally for portraits or fitting proportionally for product shots that must be seen whole. Content-aware fit can help keep faces in view when photos are framed differently.

If the job needs a QR code or a barcode for each record, such as a ticket or a stock label, add those fields as well. They are built from the data.

Running the merge

Point the merge at your data file and look closely at the first few records. Check the longest name and the widest photo, since those are the ones that break a design. When it looks right, choose how many records go on a page. One per page suits certificates and letters. Several per page suits badges and labels on a sheet.

You can export the merged result as a new document, for any final touches, or straight to PDF for printing. If the data changes after you have merged, update from the file to bring the template back in line with the latest rows.

Avoiding common problems

Missing pictures are the most common fault. A typo in a file name, or a photo saved in the wrong folder, leaves an empty frame. Live preflight checks for missing links and empty frames, so run it on the merged document before printing.

Photo quality varies when pictures come from many people. The Links panel shows effective ppi for each picture, and preflight can flag low-resolution ones, which matters for printed badges and cards.

Text that is longer than expected can overflow. Allow room in the template, and check for overset text in preflight.

Going further

For printed catalogues rather than individual cards, Layout's Create catalogue builds on the same data merge, with filtering, sorting and grouping. That is a larger job with its own approach, but it starts from exactly the same kind of data file and template.

Once a merge template works, it is reusable. Save it, and next year's badges or next month's labels need only a new data file and a folder of pictures.