FAQ

Search:

Macro: Adding the control:Link

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:="ACTIVEBARCODE.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
.Activate
Set abobject = .Object
End With
abobject.Text = "987698769812"
Now you can access the properties using the abobject variable.