
Configuration
Avira GmbH Avira AntiVir MailGate 74
OpenOffice < 3.1
This section describes how to use the OpenOffice files with OpenOffice < 3.1.
Versions of OpenOffice < 3.1 are not able to use the embedded macro in
"MailGate.odb". Thus you have to add the database manually.
1. Copy "MailGate.odb" from the package to your hard disk. (The file must exist
if you want to use Alertype+Counter.ods in the future).
***** BASIC *****
' The purpose of this macro is to register a database if it isn't already registered.
' The macro is linked to the "Open Document" event.
' This means it is always executed when opening the document.
Sub Main
Dim DatabaseName as String
Dim DatabaseCtx as Object
DatabaseName = "MailGate"
' Get context to access datasource
DatabaseCtx = CreateUnoService("com.sun.star.sdb.DatabaseContext")
' Check if database is already registered
If not DatabaseCtx.hasByName (DatabaseName) Then
Dim URL as String
Dim DB as Object
URL = thisComponent.getURL
DB = DatabaseCtx.getByName (URL)
' Register database
DatabaseCtx.registerObject (DatabaseName, DB)
End If
End Sub
Comentarios a estos manuales