Print Barcodes (or any data, really) onto Labels (i.e., mail merge to Word doc)

I’ve built an inventory system for a client using the Barcode/QR pack (woohoo!), and I need to print those barcodes on some labels. The client has bought some Avery labels which come with a Word template:

So the challenge is to get the barcode + another field sent to this template in Word so I can print about 200 labels.

Typically when I print labels, I pull the data down into an Excel spreadsheet and run a traditional mail merge to Word. I can do this with a quick copy/paste from Coda, so not a big deal and pretty easy. (See below for update on this.) But I’d love to do this directly from the system if possible.

I understand this isn’t native, but I’m wondering if there are creative ideas for how to do this…

(Honestly, I’m not sure how useful the Barcode pack is without this functionality - what else are you supposed to do with barcodes, if not print them on stuff???)

Anyways, would appreciate thoughts or ideas…


And because I’m guessing this will come up - I know I can pull data into Google Docs, but Google doesn’t have mail merge functionality (or it requires an add-on, and the company I’m building this before has privacy concerns, so that’s not an option, merp).

UPDATE: Doesn’t actually look like just pasting the data into Excel and running the mail merge like normal works after all. The bar code image pastes fine into Excel but doesn’t make it from Excel to Word.

This essentially renders the pack useless if I can’t actually print the labels… :frowning: :frowning: :frowning:

Help???

Hi @Kelly_Claus,
I’m afraid you can’t have a specific labels print template.

However, you do can print labels if you set the card view and export the page into a PDF.
Let me know if this is a viable solution for you.

Hi @Federico_Stefanato thanks - unfortunately I don’t think will work in this instance - the labels they’ve bought are pre-cut to a specific size (like most labels), so the printing needs to fit in those dimensions. The only alternative would be printing on a full-sheet label and then cutting them out by hand (ugh).

This seems like a pretty big gap in functionality, doesn’t it? Why go to the trouble of creating a barcode integration if you can’t print the barcodes you create?

1 Like

Hi @Kelly_Claus,
I certainly understand your point.

In fact, there are several use-cases where a digital-only code would perfectly work in all those contexts where you have tablet displays (e.g. shops, e-ink price tags, receptions, exhibitions).

Nonetheless, you can actually print those codes in PDF.

Yes, not ideal, but I can’t see any alternative, so far.

As Avery comes also with PDF templates, playing around and seeing if the PFD export matches some of the existing ones is what I’d do.

Let us know if you find other more efficient solutions.

Cheers!

Ignore Coda’s barcode feature and instead use a barcode font?

This page has instructions for Excel but you would actually probably just set up the barcode font in Word for that particular mail merge field

2 Likes

And this is a great idea! :+1:t2:

Innnnteresting… Okay I’ll look into this. Bummer this limitation exists in Coda. :confused: Thanks for your help!

Hi I made a doc for this, it creates svgs (an image for each page) with a grid of labels for any paper and label size, however in it’s current form to create the label layout it needs a couple lines of svg.

4 Likes

hi @Joscha_Filius , thanks for this inventive contribution
can you elaborate on how you use this?
merci, Christiaan

As for how it works, basically I use the fact you can add images generated within images with href=“data:image/svg+xml;base64,” and EncodeAsBase64() , this way you can use relative positioning in your embedded layout designs. Printed without margins these images allow for all types of pixel perfect prints within the limitations of SVG.

As for how to use the doc:

I’ll try, although I’m not very good on explaining things and since this doc isn’t particularly well designed (yet) because I was figuring things out as I went along and I’ll for sure modify the doc a little while writing this. Not everything makes sense.

Say I want to add the Avery6576DurableIDLabels layout as shown in the first post in this thread. I’ll describe one way of doing this.

Layouts are Defined on the Canvas Layouts page.
I’m going to need two Layout rows, one for the paper, and one for the label.

For the label I’m going to duplicate the Label 65 x 25.4 row. To know what values I need, for ease, first have to dissect the 6576 layout a bit. I measure the distance between labels to be 4.8 mm. So for now, I’m going to say the labels have a left and right margin of 2.4 mm. WxH should be 31.75 mm x 44.45mm. But I add in the 4.8 on the width I enter it the Width column, again because I did not think things trough and that is how the templates are set up. Set these values for the corresponding columns. Now I open the row to change the change the label design svg a little, for example the center positition of text was baked in the used SVG template. Alternatively what you could do create a design you like in Inkscape. Save it as a simple SVG, paste it in the Label Design SVG Column. And add in your the fields {1}{2} … ect. This part could definitely be designed a lot better, but for now it fits my purposes, so modifying it requires some some coda skill or knowledge of SVG. The barcode field is set-up as an image href, and column it gets the data form currently uses Barcode pack and Code128 .

For the paper I’m going to duplicate the Letter row name the format and adjust the margins
Copying the margins from the word template, setting the margin Columns in my Letter: Avery6576 row. Based on what measure and accounting for the margins left and right of the labels, so the paper margins on the left and right are reduced by 2.4 mm in this case. Now set the parent of the Label to this Letter: Avery6576 row.

On the Items page in the Items table, the label images are created, let’s switch the layout in the Label Layout Dropdown and see the previews update. The Images selected Pages on the Page should also update. Select the pages you want to generate with the dropdown, press update page selection button and your pages should pop up. I tried to do this with a formula instead of a table but that did not work for me.

4 Likes

@Joscha_Filius , thx a lot for the details.

I’m curious at what solution you may have come up with. I’m facing a similar situtation and looking for help. Appreciate any insights. Thanks!