Text Documents (Writer)
HTML Documents (Writer Web)
Spreadsheets (Calc)
Presentations (Impress)
Drawings (Draw)
Database Functionality (Base)
Formulae (Math)
Charts and Diagrams
Macros and Scripting
Office Installation
Common Help Topics
OneOffice Logo

ThisDatabaseDocument object

ThisDatabaseDocument addresses the active Base document whose properties can be read and set, and whose methods can be called.

ThisDatabaseDocument returns an object of type com.sun.star.sdb.XOfficeDatabaseDocument.

Syntax:


       ThisDatabaseDocument
    

When the active window does not relate to a Base document, ThisDatabaseDocument returns Nothing.

When the active window is the Basic IDE, ThisDatabaseDocument object returns the database owning the current script.

Example:

Opening current database "formName" and maximizing it can be achieved as shown:


        Dim form As Object
        ThisDatabaseDocument.CurrentController.connect("","")
        form = ThisDatabaseDocument.FormDocuments.getByName("formName").open )
        form.currentController.frame.ContainerWindow.IsMaximized = True