What is ActiveX Basic

The ActiveX Basic is designed:

  • For simple integration purposes
  • In order to provide a simple ActiveX interface for mid-range packages.


Server Name

LppxLT.Application with the typelib LppxLT.tlb


Function Description

CloseDocument
Close a document
Parameter: | String DocName BOOL Save ( optional : default TRUE )
Return Value: | None
Example: | CloseDocument (''c:\Labels\Identity.lab'')
If the document was open in ReadOnly mode, then the document will not be saved whatever value will be set for for the Save parameter The DocName parameter is the full name of the File

CloseAllDocument
Close all open documents
Parameter: | BOOL Save ( optional : default TRUE )
Return Value: | None
Example: | CloseAllDocument( FALSE )

OpenDocument
Open a document
Parameter: | String DocName BOOL ReadOnly ( optional : default FALSE )
Return Value: | BOOL that indicates if the operation was successfull
Example: | OpenDocument (''c:\Labels\Identity.lab'',true)
The DocName parameter is the full name of the File

GetActiveDocument
Get the active document
Parameter: | None
Return Value: | String that return the full name of the file
Example: | String Activedoc = GetActiveDocument ()
The returned string is empty when there is no active document.

GetDocumentCount
Get the number of open document
Parameter: | None
Return Value: | Short that return the number of open document
Example: | Short NbDocuments = GetDocumentCount ()

GetDocumentName
Get the Name of an open document
Parameter: | Short index ( start index is 1)
Return Value: | String that return the Name of the document (full name of the file)
Example: | String DocName = GetDocumentName(2)
Use GetDocumentCount to get the number of open documents

GetVariableValue
Get a variable value
Parameter: | String VarName
Return Value: | String that contains the variable value.
Example: | Value = GetVariableValue(''Firstname'')
This is limited to Form and Database Variables.

PrintDocument
Print the active document
Parameter: | Short LabelQuantity Short LabelCopy ( optional : default 1) Short InterCut ( optional : default 0) Short PageCopy ( optional : default 1) Short StartLabel ( optional : default 1 ) String FileName ( optional : default empty string)
Return Value: | BOOL that indicates if the operation was successful
Example: | PrintDocument (1)
Return false if no active document.

SaveDocument
Save the active document
Parameter: | None
Return Value: | BOOL that indicates if the operation was successful
Example: | SaveDocument()
If the document was open in ReadOnly mode, then the document will not be saved Return false if no active document.

SaveDocumentAs
Save active document in a new file
Parameter: | String DocName
Return Value: | BOOL
Example: | SaveDocument (''c:\Labels\Identity.lab'')
The DocName parameter is the full name of the File

SetActiveDocument
Set the active document
Parameter: | String DocName
Return Value: | BOOL that indicates if the operation was successfull
Example: | SetActiveDocument (''c:\Labels\Identity.lab'')
If the document was not already open then the return value will be False. The DocName parameter is the full name of the File

SetVariableValue
Set a new value to a variable
Parameter: | String VarName String VarValue
Return Value: | None
Example: | SetVariableValue(''Firstname'',''Roxie'')
This is limited to Form and Database Variables.

SwitchPrinter
Switch to an other printer
Parameter: | String PrinterName
Return Value: | BOOL that indicates if the operation was successfull
Example: | SwitchPrinter (''HP Laserjet 4'')


Functions list

Function Name

Function Description

Document Functions

OpenDocument

Open a document

CloseDocument

Close a document

CloseAllDocument

Close all open documents

SaveDocument

Save the active document

SaveDocumentAs

Save active document in a new file

SetActiveDocument

Set the active document

GetActiveDocument

Get the active document

GetDocumentName

Get the Name of an open document

GetDocumentCount

Get the number of open document

Variables Functions

GetVariableValue

Get a variable value

SetVariableValue

Set a new value to a variable

Print Functions

PrintDocument

Print the active document

SwitchPrinter

Switch to an other printer

.