Barcoding in Microsoft Word

Code 39 in Word Document.

Code-39 Fonts in Word

Self-checking fonts such as Code 39 Fonts have checking codes built-in, which makes implementation on a Mac or Windows easy. In the event Code-39 or Codabar cannot be used, IDAutomation provides the Microsoft Office Macro VBA to automatically format more complex barcode fonts.

Self-checking fonts are easy-to-use in Word as well as other applications and can be entered directly from the keyboard. For example, to create a barcode that encodes the data “1234ABCD” with the Code 39 Font:

  1. Select the font from the list of fonts in an application
  2. Type the start character, in this case it is “!”
  3. Type the data, in this case it is “1234ABCD”
  4. Type the stop character, in this case it is “!”
  5. Change the font back to the default font of the document.

Automating the printing of self-checking fonts for a Word mail-merge is also easy. IDAutomation recommends embedding the applicable font in Word when distributing documents containing barcodes. This however, requires a Developer License to the font.


Create barcodes for 
Windows and Mac on demand

Create barcodes with the Barcode Image Generator on either a Windows or Mac platform, to either save the barcode file or copy to clipboard and paste into any application on the fly. Easy to use in Word, as well as other graphic programs like PhotoShop, PowerPoint and Visio. 

Mail-Merge Barcoding

The only method of barcoding in a Word mail-merge document is to use barcode fonts. Automating the printing of self-checking fonts for a Word mail-merge is easy. All that is needed is to make sure the start and stop characters appear directly before and after the data in the barcode.

For example, to print the Code 39 Fonts from a MS Word mail merge, use !«FieldName»!  for the merge field where FieldName is the name of the field to merge. This entire set of characters must have the barcode font selected for it, even though it will not look correct in the main document. After the merge is performed, “«” and “»” will be removed and FieldName will be replaced with the text in the data source.

If the self-checking fonts are not used, then the data will need to be retrieved from Access or Excel where the font is already formatted in the data source. An example of this is found in the Word and Excel Mail-Merge Tutorial. Working examples are also provided with all IDAutomation Barcode Font Packages.