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

Barcode ActiveX Microsoft Word Add-Ins

Download the Word 97/2000 Template that will allow you to install all of the macros described below:

Convert Selected Text To A Bar Code (TextToBarCode)
This macro converts any selected text to a bar code. 
To convert selected text to a bar code:

  • Choose the font size equivalent to the height that you want your bar code to be. There are 72 points per inch, therefore if you want a one-inch bar code, change the font size to 72. Note: if the font size is less than 18, a quarter inch high bar code will be produced.
  • Run the TextToBarCode macro by clicking on the small bar code icon in the Word toolbar or by selecting the "AXTextToBarCode" macro from the "Tools" menu.

Prompt For A Bar Code Message (PromptForBarCode)
This macro pops open a dialog box asking you to enter a bar code message, and choose other settings for your barcode. After you enter in the message, the dialog box disappears and a bar code is inserted in your document wherever the cursor is. 

Adding Bar Codes To Labels or a Mail Merge Document In Word (MergeBarCodes)
This macro searches through a document and converts any text that has been formatted with any of the installed bar code styles to a bar code. When you install the bar code macros, you will be prompted to select the bar code styles that you would like to use. Each style represents a different type of bar code that you can create. Please refer to the on-line help file to learn more about all the different types of bar codes that you can create with the TAL Bar Code ActiveX.

This macro is ideal for use with mail merge documents. When you create your main "merge document" with the mail merge tool in Word, select any "Insert Fields" or static text that you want converted to a bar code and change its style to any of the installed bar code styles. Next, run your mail merge and merge to a "New Document". Finally, run the MergeBarCodes macro to fill in bar codes in the resulting merged document. 
The bar code styles must be applied to the merge template prior to the actual merge between the template and the merge data. The template and the data must be merged to a new document.

Note: Since Word styles apply to an entire line or cell, ensure that each piece of information that you want bar coded is alone on a separate line, or in separate cells of a table.

Bar Code Label Generator (MakeBarCodeLabels)
This macro uses the label tool in Word along with the TAL Bar Code ActiveX to create bar code labels using almost any label stock available for both dot matrix and laser printers. This macro allows you to create single labels, multiple labels with the same bar code on each label or multiple labels with incrementally numbered bar codes.

This is a very powerful macro with many options and it is also a great example of what you can do with Word and the TAL Bar Code ActiveX control.

Use Excel or Access as the source for your Label Documents

In the AXNewMacros Module you will find some sample code which demonstrates how to take data from an Access database or an Excel spreadsheet and use it to create barcodes on a labels document in Word.

Note: All of these macros are also available for B-Coder.


Categories: Macro / Code Sample, Microsoft Word, Barcode ActiveX

Last Updated: 2011.09.08

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