Avery Mailing Labels in Word Document Template

Posted by ddubois on 04-Jun-2015 10:07

Has anyone figured out how to design a document template using WORD to loop through all object records (Students) and print mailing labels.


All Replies

Posted by Gian Torralba on 04-Jun-2015 11:43

Please check on how looping tokens work in Rollbase. Please see the Rollbase User Guide, Chapter 5: "Adding Business Logic > Iterating thru Records". This tokens can be used in the template files to show record data in a template.

Hope this helps,
Posted by ddubois on 04-Jun-2015 12:14

Good Advice...Yes, when I use looping tokens such as:

Then all the records end up in this first label.  If I put the loop begin in the header of the document and the loop end in the footer, I get a full page of labels with the same record in each label.  I need a different record in each label of the page.

Posted by Gian Torralba on 04-Jun-2015 12:21


Can you try creating a single print mailing label selection and wrap it with the LOOP token? I don't know if anyone have ever done looping data in a specific selection of a word document.



Posted by ddubois on 04-Jun-2015 12:35

This code in my word document allows the report to print correctly in a document:

The result of this of course is one column of addresses:

Now I need to get these records in a avery 5160 mailing template like below:

Of course, I can export the names to a CSV or xls, and these files would merge perfectly to WORD.  However, I need to make this simple so that a user can print labels when needed.

Posted by Gian Torralba on 09-Jun-2015 11:37


Someone suggested that maybe you can create an HTML template and render it as a PDF rather than using a word template since HTML templates are more versatile in displaying data since you can create the loop and the HTML elements yourself.

Thank you,


This thread is closed