Skip to main content
One feature that Microsoft Word has, but Microsoft Access does not have, is the ability to choose a starting label. However, moving your ActiveX barcoding application to Word complicates matters because Word does not support Data Binding. This means that there is no control source property, and you cannot simply bind the control a field in your Access Database. There are 2 solutions to this problem. Both require some VBA Code. The first and easiest solution is to follow the steps in this Microsoft Knowledge Base article: Q95806. This allows you to remain in Access, but also to choose your starting label (and/or create duplicate labels). If you are more confident with VBA or would rather use Word as your labelling tool, we have developed some sample code for Microsoft Word that will loop through all of the records in an Access table and create barcodes on a label document in Word.

Using the Word macro

To use the code below:
  1. Download the Word 97/2000 Template that will allow you to install this macro and others and jump to step 6 or Copy the Sub Main() Routine to the clipboard by highlighting it and pressing Ctrl + C.
  2. In Microsoft Word, Open the Visual Basic Editor by pressing Alt + F11
  3. Insert a new Module, by clicking on Insert|Module
  4. Paste the code into the module
  5. You must create a reference to Microsoft DAO. Included below is a Macro that can try to create the reference for you. Copy the AddReference macro to your module and run it. If you prefer, you can manually add the reference by going to the Tools Menu in the visual Basic Editor and click on References. Find Microsoft DAO on the list and check the box beside it.
  6. Change a few details in the code to have the macro open the correct database, table and field and also to the create the correct Labels for your application. (The green comments below indicate where you should make your changes.)

Adding the reference to Microsoft DAO

The following macro adds the reference to Microsoft DAO:

Removing the reference to DAO

The following macro removes the reference to DAO:
Last modified on November 3, 2026