Chapter 1 -- 4
Programmer’s Guide
Mechanisms
Your labeling software offers you two main objects: the
Application
object that is at the top of the hierarchy and the
Document
object. These main objects provide access to the
subordinated objects (see Chapter 2 - 15: the hierarchy
diagram).
The first step to activate the server is the main object creation,
in this case, the
Application
object.
The last step is the deactivation of the server with the
Quit
method.
Server Activation
Several methods are available to create an ActiveX object.
This function creates and returns a reference to the
Application
object.
Syntax
CreateObject(server name)
Defines an object variable. This object variable is meant to con-
tain the object reference.
Dim as Object
creates a link at exe-
cution.
Dim MyApp as Object
Set MyApp = CreateObject(”Lppx2.Application”)
This code launches the application that creates the object. In this
case, the labeling software. As soon as the object is created, you
reference it in the code with the object variable that you have
defined, i.e. MyApp.
Note
If you define an object variable with “As Object”, a variable
containing a reference for any object type is created. However,
the access to an object via this variable is realized by a late
bind, i.e. the link is created during the execution of your pro-
gram. To create an object variable that induces an early bind,
i.e. a link during the compilation of your program, define the
object variable with a specific identifier (see below).
Create Object
function