Put QR codes, barcodes and attached images into documents
In an Excel template, press a cell in the editor (3. cell mapping), choose a text or number field and pick QR code / CODE128 / EAN-13 under "Embed as a QR code / barcode". For an attachment field, turn on "Embed as an image". In Word write {{#qr fieldcode}}, {{#code128 ...}}, {{#ean13 ...}} or {{@attachmentfield}}. A value that cannot become a code leaves that place empty; the export continues.
Steps
1. Excel: choose the cell for the QR code / barcode
In the template editor's 3. cell mapping, press the cell, then choose a text, number, date or record-number field. The option 「QR / バーコードとして埋め込む」 appears; pick QR コード, CODE128 or EAN-13 (JAN). Leave 「大きさ (px)」 (size) empty to fit the cell (or the merged range), or enter a size (the side of a QR code, the height of a barcode). A QR code also has an error-correction level (L / M / Q / H). Press 「この内容で対応付ける」 and save.
2. Check which values can become a code
QR codes take up to 1,000 characters (Japanese is fine). CODE128 takes half-width letters, digits and symbols only, up to 60 characters. EAN-13 takes 12 digits (the check digit is added for you) or 13 digits (the check digit is verified). Hyphens and spaces are ignored. For a value that cannot be a code (empty, wrong length, wrong check digit) the cell stays empty, the export continues and the reason is recorded in the output log, so a wrong barcode never ends up on a printed form.
3. Word: write {{#qr fieldcode}}
Write {{#qr InvoiceNo}} where the QR code should appear. Barcodes are {{#code128 InvoiceNo}} and {{#ean13 JAN}}. Change the size with {{#qr InvoiceNo|25}} (millimetres: the side of a QR code, default 20; the height of a barcode, default 12). Inside a line-item table row, every row gets its own code.
4. Put attached images in (Excel)
In the field list of the mapping, pick the attachment field from 「添付ファイル (画像)」 and 「画像として埋め込む」 appears. Choose 「セルに合わせる」 (fit the cell) or 「幅・高さ (px) を指定」 (set width / height). Turn on 「添付ファイルの全件を左から並べる」 to place every image side by side; off places only the first image. If a line-item table has an attachment column, turn on 「添付ファイルの列は画像として埋め込む」 in the subtable settings to get one image per row.
5. Put attached images in (Word)
Write {{@SitePhoto}} in the Word template to place the first image of the attachment field SitePhoto. Use {{@SitePhoto|all}} for every image and {{@SitePhoto|all,20}} to set the height (20 mm). It is the same {{@…}} notation as an approver's seal.
6. Export from a record and check
Press the button on the record screen. Attached images are fetched from the user's kintone on every export and are not stored on our server. Only PNG / JPEG / WebP images are used; attachments that are not images (such as PDF), images over 5 MB each, and anything beyond 20 images per export are left out, and the finished dialog says how many attachments could not be sent as images.
Frequently asked questions
Are digits printed under the barcode?
No. Write the value you want people to read in another cell or as text.
Does it work in bulk and scheduled exports?
QR codes and barcodes do. Attached images are placed only when you export from the record screen (they stay empty in bulk, scheduled and summary exports).
Which barcode types are supported?
QR code, CODE128 and EAN-13 (JAN).