QR Code Barcodes in Adobe InDesign using Data Merge
QR Code in Adobe InDesign using Data Merge
- This tutorial shows how to create QR Code 2D barcodes in Adobe InDesign using an Excel file as data source.
Step 1A. Import module into Excel
- Click on Developer tab, select Visual Basic, or press ALT + F11 on keyboard

- Right-click the Excel Object and select Import File...

- Select BarCodeWizQrCode.bas.
- The default location of the file is:
C:\Program Files\BarCodeWiz\BarCodeWiz QR Code Fonts\BarCodeQrCode.bas

- The following module should now be part of the Access file.

Change the line:
QrCodeEncode = bcwiz.Encode(strBarcode, symbolSize, errorCorrectionLevel, allowSpecialChars, fnc1Mode, quietZoneWidth, borderWidth, characterEncoding)
to:
QrCodeEncode = bcwiz.Encode(strBarcode, symbolSize, errorCorrectionLevel, allowSpecialChars, fnc1Mode, quietZoneWidth, borderWidth, characterEncoding,"@")
(Add "@" at the end of paragraph)

Step 1B. Prepare the data to be merged
- Open the Excel file with data to convert or enter the values. Our example has the following data:

- Use the function =QrCodeEncode

Save the file as Text (Tab Delimited), or CSV UTF-8 (Comma Delimited) format
- Click on File > Save As
- For InDesign versions older than 2022 Select CSV UTF-8 (Comma delimited) and enter the name of the file: QRCode_merge_data.csv. Or simply save the file as Text (Tab Delimited).
- Close EXCEL. Otherwise, InDesign will not import the file.

Step 2. Start Data Merge in Adobe InDesign
- Click Window > Utilities > Data Merge

Step 3. Select Data Source
- Right-click the panel menu icon and click Select Data Source...
NOTE! Close EXCEL before importing the file. If the file is open, InDesign won't open it.

- Browse for the file we saved in step 2 and click Open.

- The fields are now shown in the Data Merge panel.

- Insert text field into the document

Step 4. Create the Merged Document
- Click on the Create Merged Document button at the bottom of the panel.

- Select which records to merge and click OK. We are selecting All Records here.

Step 5. Find the @ sign
- Press CTRL + F on your keyboard.
- Set Find what and Change to fields as presented.

- With all the @ signs removed, the document should look like this

- Set the font to BCW_QR
- Font size to 12
- Line spacing to 12.
NOTE: For smaller barcodes, you can set the point size as low as 2pt - set line spacing accordingly

Done! Barcodes are ready.
