Ben
|
Best Answer
This InDesign solution picks up after Step 9 of the Data Matrix VBA in Excel solution.
Other 2D VBA solutions:
QR Code VBA Tutorial
PDF417 VBA Tutorial
Aztec VBA Tutorial
1. After installing the package, importing the VBA, and encoding the data, use the SUBSTITUTE function to convert the carriage return CHAR(13) and line feed characters CHAR(10) to visible characters prior to saving the file as a CSV. We need to replace the characters so that the CSV file is able to maintain all encoded data rows.
=SUBSTITUTE(SUBSTITUTE(IDAutomation_DMatrix_FontEncoder(A2),CHAR(13),"_r"),CHAR(10),"_r")
NOTE: SUBSTITUTE is used twice to convert the return and the line feed to _r or a character of your choice, preferably a character that is lowercase and will not be displayed in the InDesign report.
2. Save the file as a .csv.
3. Open an InDesign project. Select Window - Utilities - Data Merge.
4. Choose Select Data Source.
The encoded data appears as:
5. On the left panel of InDesign, drag a text field onto the document.
6. Drag the merged source field to the text field.
7. Check the Preview check box within the InDesign Data Merge box.
8. Select Edit - Find/Change.
9. Select the GREP tab. In the Find what box, enter _r_r or the replacement character used from Excel. In the Change to, enter ~b~k for return and line feed.
Select Change All and choose Done.
10. Highlight the encoded data and select the IDAutomation2D font.
11. If the barcode has white horizontal lines, modify the spacing.
Adjust the spacing until it reaches the desired size square without spacing.
12. The 2D barcode is created.
QR Code Font Encoder:
=SUBSTITUTE(SUBSTITUTE(IDAutomation_QRCode_FontEncoder(A2),CHAR(13),"_r"),CHAR(10),"_r")
PDF417 Formula:
=SUBSTITUTE(SUBSTITUTE(IDAutomation_PDF417(A2),CHAR(13),"_r"),CHAR(10),"_r")
Aztec Formula:
=SUBSTITUTE(SUBSTITUTE(EncAztec(A2),CHAR(13),"_r"),CHAR(10),"_r")
Data Matrix Native Excel Font Option
=SUBSTITUTE(SUBSTITUTE(IDAutomation_NXLS_DataMatrix(A2,3),CHAR(13),"_r"),CHAR(10),"_r")
PDF417 Native Excel Font Option
=SUBSTITUTE(SUBSTITUTE(IDAutomation_NXLS_PDF417(A2,3),CHAR(13),"_r"),CHAR(10),"_r")
QR Code Native Excel Font Option
=SUBSTITUTE(SUBSTITUTE(IDAutomation_NXLS_QRCode(A2,3),CHAR(13),"_r"),CHAR(10),"_r")
Posted 3.9 year(s) ago
|