Issue Running MakeBarCodeLabels Macro with Small Labels

If you use a custom label size that is less than 1″ wide this macro may run forever and never insert a barcode: Since Word generates a table that represents the label sheet sometimes it must create “Padder” cells between the labels. If our macro did not check the width of each table cell before inserting a barcode it would try to stuff barcodes into these extra cells. If you were printing a sequence of barcodes, when you printed them you would find gaps in the sequence, and tiny barcodes between your labels. Since No Avery Label is less than 1″ wide, the code was written to look for cells that are more than 1″ wide before pasting the barcode. If a cell is less than 1″ wide, it is assumed to be a padding cell so it moves on to the next cell. Thus if you have no cells greater than 1″ it will become stuck in a loop trying to find a one”.

To fix the problem you must edit the macro:

  1. Go to Tools|Macro|Macros
  2. Click on MakeBarCodeLabels.Main
  3. Click on Edit
  4. In the VB Editor go to the Edit Menu and click on “Find”
  5. In the “Find What” box type “padder” and click on “Find Next”
  6. 2 lines below the one that you'll find is the line:
     Do while PointsToInches(selection.cells.width) < 1

    Modify this line to end with "< 0.8" (use your custom label width!)

  7. Click on Save, then close the VB Editor and try running your macro again.

This applies to both the B-Coder and ActiveX versions of this macro.

Contact Us