We use cookies to provide you with the best experience and functionality on our website. By continuing to use the site, you are agreeing to our use of cookies.   

Word FAQ


Office 2007,2010: I can no longer edit or modify the barcode once I close the file

I created a document with the control, I save it, reopen it and I can no longer edit or modify the barcode.
This has something to do with the security settings of your Office, Excel, Access or Word installation. The ActiveX component is blocked by the security settings when opening the file.
You can change this by openning the document from a trusted location:

1. Click the Microsoft Office Button and then click on teh Options button.
2. Click Trust Center, click Trust Center Settings, and then click Trusted Location.
3. Add the path of your document file to the trusted locations.

Using the control

How do I use ActiveBarcode control with Word, Excel or Access?
Please have a look at our 'Examples' section. There you'll find many step-by-step instructions that will help you. You can solve nearly all problems and automate tasks with ActiveBarcode and Visual Basic for Applications (VBA).

{CONTROL BARCODE.BarcodeCtrl.\s}

The control is not visible and it displays {CONTROL BARCODE.BarcodeCtrl.\s}
This is because of your options setting in Word. Go to the options dialog of Word. Then have a look for the option "Field functions" and set this one to "not checked".

Mail merge with ActiveBarcode

I want to add a barcode to my mail merge. How can I bind a data field of my control data to ActiveBarcode?
You have to use a macro to print your mail merge. This macro has to make the binding. The following example shows how you can do this. Have a look at the name "Productcode". This is the name of the data field bound to ActiveBarcode in this example. Please replace with your data field name.

Sub MailMerge_example_with_ActiveBarcode()
' MailMerge_example_with_ActiveBarcode Makro for Word2000
' (c) 1999 by Frank Horn
' Macro shows how to print barcodes in a mail merge.
if MsgBox("Do you want to print mail merged documents?", vbYesNo,
"Question") = vbYes Then
  'counter to zero
  num = 0
  'first record is number one
  ActiveDocument.MailMerge.DataSource.ActiveRecord = 1
    ' Fill ActiveBarcode text property now
    ActiveDocument.Barcode1.Text = ActiveDocument.MailMerge.DataSource.DataFields("Productcode").Value
    ' do not prompt for printing...
    Options.PrintBackground = True
    ' print page
    ' recognize old record
    lastone = ActiveDocument.MailMerge.DataSource.ActiveRecord
    ' select next record
    ActiveDocument.MailMerge.DataSource.ActiveRecord = wdNextRecord
    num = num + 1
    ' check if there are new ones
  Loop While ActiveDocument.MailMerge.DataSource.ActiveRecord <> lastone
  ' notify user
  MsgBox (Str(num) + " pages printed!")
End If
End Sub
To start printing, launch this macro. Otherwise the barcode will not be updated.

There is a example file available in our download section.

Word labels or tables make problems?

I want to add a barcode object to a label or a table. The problem is that I cannot position it inside the table or the label. The barcode always "jumps" to the outside. How can I fix this problem?
If you add a barcode to a document the default for the "over the text" option of objects is always enabled. If this option is enabled you cannot position an object inside the table or the label. To fix this problem you have to disable this option. Click the object with the right mouse button and select the function Object format... A dialog will appear. Please select the "Position" tab and you'll see the "over the text" property at the bottom of the options. Disable this option and click Ok. Now the barcode is movable into the table and/or label.

No modification possible?

I try to change the barcode but nothing happens! I can't even move or resize it. Whats wrong?
To change the barcode you must be in design mode. Use this button:Design mode to switch to design mode. Then you'll be able to change the barcode by clicking the barcode with the right mouse button.

Change barcodes content automatically before printing:

We would like to add a barcode to our letters. This barcode should be automatically added into every letter. How does this go?
You first add the ActiveBarcode control element into your document. Position the bar code by your wishes and set the basic properties as for example the type and the font size.

You find tips to insert the control element in a Word document in our examples: /howto/word.html. On this page you also find a link to a Flash video.

To automatically update the barcodes content before printing we use a VBA macro:
 Private Sub SetBarcode()
'Set the barcodes content (text property)
Barcode1.Text = Date
End Sub

Sub FilePrint() ' replaces normal printing via dialog
' Sets the barcode content before printing
' Now launch printing:
End Sub

Sub FilePrintDefault() ' replaces defualt printing (no dialog)
' Sets the barcode content before printing
' Now launch printing:
ActiveDocument.PrintOut Background:=False
End Sub

In the function "SetBarcode" you can customize the contents of the barcode according to your wishes. In this example the current date is simply encoded. Here you can change the text property to other single or compound data.

Both procedures "FilePrint" and "FilePrintDefault" intercept the printing process, both call "SetBarcode" and continue the printing process.

Macro: Adding the control:

How can I create the barcode control using a VBA macro? For example to place a barcode on a document.
Use the following code to create a barcode at the cursors position:
 Set ab = Selection.InlineShapes.AddOLEObject(ClassType:="BARCODE.BarcodeCtrl.1",
FileName:="", LinkToFile:=False, DisplayAsIcon:=False)
To access the standard properties, you can use the variable ab now:
e.g. ab.width=200

To access the controls properties and methods, you have to do the following:
 With ab.OLEFormat
Set abobject = .Object
End With
abobject.Text = "987698769812"
Now you can access the properties using the abobject variable.

Change the barcode text with a VBA macro

How can change the coded text of the barcode inside a VBA macro?
Use the following command to change the coded text:
 ActiveDocument.Barcode1.Text = "[HierZeichen/ziffernfolge eingeben]" 

Security messages while opening Office 2003 documents

I receive security messages when opening Word or Excel documents under office 2003. Is there another possibilityto change this than lowering the security level?
Unfortunately, there is no so elegant solution for Office 2003 as for example for Office in 2007 with the trusted locations. Nevertheless, it is possible to stop the query in general for ActiveX controls in Office 2003, by inserting a key into the Windows Registry. Please note, that this solution is not only for our control but for all ActiveX controls. You would receive this warning also no longer with foreign controls!

Der Registry Eintrag lautet:

If you liked to carry out the change, please note that the update of the Registry always has a certain danger. We recommend you, to perform a data abckup before the intervention in the Registry.

Search this site with Bing:
| Home | Shop | Download | E-Mail | Datenschutz | Imprint | Version 6.1.0 |
Web DesignszCWs
Web design & developement:

Frank HornActiveBarcode Generator App
Web design
Copyright Frank Horn
Lars SchenkActiveBarcode Object
Web- & server component
Command line
Copyright Lars Schenk

All trademarks and product names mentioned are the property of their respective owners.