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
![](https://media.barcodewiz.com/images/207878b9-f4c7-461b-8bb8-35d51b848eb3-qr-indesing-001.png)
- Right-click the Excel Object and select Import File...
![](https://media.barcodewiz.com/images/83414732-75b7-4211-ac36-3bbb8530765c-qr-indesing-002.png)
- Select BarCodeWizQrCode.bas.
- The default location of the file is:
C:\Program Files\BarCodeWiz\BarCodeWiz QR Code Fonts\BarCodeQrCode.bas
![](https://media.barcodewiz.com/images/315fd1f4-dc98-41ed-b55b-2615a2cb0d2e-qr-access4.png)
- The following module should now be part of the Access file.
![](https://media.barcodewiz.com/images/bde67871-e03c-4bd3-9016-8a96c9039c6f-qr-indesing-003.png)
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)
![](https://media.barcodewiz.com/images/ea890f65-7aa0-4daf-bd30-17624f1c5d12-qr-indesing-006.png)
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:
![](https://media.barcodewiz.com/images/97716c6f-2fbc-4c46-8f94-dee4834ba643-qr-indesing-004.png)
- Use the function =QrCodeEncode
![](https://media.barcodewiz.com/images/dff42bce-8cfb-477a-b7aa-4ed54980f10e-qr-indesing-005.png)
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.
![](https://media.barcodewiz.com/images/1eb6b478-0581-46a7-953d-ebb420a79950-qr-indesign-007.png)
Step 2. Start Data Merge in Adobe InDesign
- Click Window > Utilities > Data Merge
![](https://media.barcodewiz.com/images/42435f95-c004-438d-9dba-c73d02cc8c7f-indesign007.png)
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.
![](https://media.barcodewiz.com/images/a5274565-329e-40b2-b9cf-78a1b3817031-indesign008.png)
- Browse for the file we saved in step 2 and click Open.
![](https://media.barcodewiz.com/images/50c74f24-06b9-4132-8859-7292b4a42164-qr-indesign-013.png)
- The fields are now shown in the Data Merge panel.
![](https://media.barcodewiz.com/images/ce6f6851-d89c-4022-911b-7cc03eff6bd8-qr-indesign-014.png)
- Insert text field into the document
![](https://media.barcodewiz.com/images/d5ae8387-8932-4a00-b386-5bd7b30102d1-qr-indesign-009.png)
Step 4. Create the Merged Document
- Click on the Create Merged Document button at the bottom of the panel.
![](https://media.barcodewiz.com/images/e23da9bd-79d7-4045-b4a4-d172f5f0559a-qr-indesign-015.png)
- Select which records to merge and click OK. We are selecting All Records here.
![](https://media.barcodewiz.com/images/9955aa8e-c8a3-45f8-80b4-c3f4092a01ab-qr-indesign-016.png)
Step 5. Find the @ sign
- Press CTRL + F on your keyboard.
- Set Find what and Change to fields as presented.
![](https://media.barcodewiz.com/images/523c2caa-476a-4e7c-9965-3e137a66d77f-qr-indesign-008.png)
- With all the @ signs removed, the document should look like this
![](https://media.barcodewiz.com/images/b31dad3f-8aed-49e5-9ab1-a5d979cf951c-qr-indesign-010.png)
- 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
![](https://media.barcodewiz.com/images/71737b72-fc5b-45d2-a6ba-b3baf8da6fad-qr-indesign-011.png)
Done! Barcodes are ready.
![](https://media.barcodewiz.com/images/4b6c0efc-9ad4-4edd-8b23-f3ceb22fe84b-qr-indesign-012.png)