Increment a serial number on microsoft word after each print

One of my colleagues asked me if it was possible to create a dynamic counter that automatically prints a different number each time the document is printed on Microsoft word, the point was to have a unique serial number on each print, of course one can manually create multiple numeric copies of the same document and change the serial number on each copy then print all those documents, but in my case my colleague was planing to print out 36000 copy of the same document, the content should remain the same on all the 36000 copies, the only thing that changes is the serial number which he would insert somewhere in the document so he would see something like 00001, 00002, 00003… on each printed document so now imagine the time it would take to create and change that number manually on 36000 files ! that’s enormous and inevitably requires automating.
My colleague thought I could use my programming skills to create a sort of macro that would do the trick but I honestly have no past experience with VBA and god thanks I didn’t start looking to write a vba script because there was a quite easier solution I am going to share with you in this article.

Generate a serial number using Word Mail merge and Excel

the solution to insert and increment automatically a counter on word is to use a feature that’s initially made for a different purpose so this solution is actually a turnaround but still it’s way easier than writing a vba macro.

the final result will be a doc file containing as many pages as you want, each page will contain a unique number right in the location you would previously specify before you generate the final result.

As an example let’s suppose I want to print 10 pages where each page contains a number that will increment on each print, so my pages will have 01, 02, 03, …10. Here’s the steps :

1. Create an Excel file containing the serial numbers

With Excel you can easily create a formula that will generate all the possible serial numbers that we’ll need for the following steps, here’s how to do it:
-create a new Excel file
-pick the first cell (top left A1) and type the initial number, 1 in my case

-chose the column below (A2) and insert this formula in it: =SUM(A1;1)

-Now you just need to reproduce the same thing on the whole column until you reach the maximum number of serials you want to general (10 in my case), this can be done by dragging the small black tile on the bottom right of the selected cell (A2) and moving the mouse down until reaching the desired cell.

this will automatically apply the increment formula on all the selected cells:

-save the document somewhere on your desktop and keep excel aside for now.

2. Import the Excel file on word using the mail merge feature

-open the document you want to print using Microsoft word, at this stage the document is still not containing the serial number.
-look for the mail merge button, you should find it in Mailings > Start Mail Merge > Step by step mail wizard…

-On Select Document Type chose Letters

-click on Next (bottom right) until you reach step 3

-On step 3 click on Select a different list and chose the Excel file we created previously

-Multiple windows are going to show up, just click on ok then move to step 4 by clicking Next
-On step 4 click on More items

-A window is going to appear containing the only column available on your Excel file. by clicking insert this will place the counter variable name right where your cursor is positioned in your document. You can insert the variable name then simply cut/paste it where you want, or you can simply position your cursor on the desired location before opening that window, both ways are fine.

-close that window and keep clicking Next until you reach the 6th step

3. Print !

Now that you’ve gone through the steps, your pages are ready for printing, you can verify your documents are fine before you proceed to printing by clicking on Edit individual letters then you can simply Print

Also read...

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *