Questions? Search our site or call us at 1-800-722-6004

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.


Categories: Troubleshooting, Microsoft Word

Last Updated: 2011.07.05

Need more help?

Don't hesitate to call or email us with your questions

Our office is open 9AM - 5PM Monday Through Friday (E.S.T.)

Technical Support: 215-496-0202

Toll-Free: 1 (800) 722-6004
Skype: taltech1 (Voice only)
Email: support@TALtech.com