Jörg ,
Well, down and dirty works, maybe..
I am left with one puzzle and a concern, however. I changed my little
routine to this.
const title_must_be = "OpenOffice.org Base"
sub onOpenDocumentMain
dim df as variant
df = Stardesktop.Frames
If RIGHT((df(df.count-1).title), len(title_must_be)) = title_must_be Then
msgbox "this is a Base document"
' check if database is registered in
' dbMaster
else
msgBox "Not a Base Document"
End if
end sub
Now here is the puzzle. If I open anything other then a Base document
the document
opens and the msgBox is displayed once, ontop of the newly opened window.
If it is a Base document then the msgBox is displayed twice and the
actual document
frame doesnot open until the seconod message box is closed. Now this
might turn
out to be an advantage for my use, which is to associate a default form
for a given
database, and then optionaly not display the actual database frame at all.
Thanks
Drew
Jörg Schmidt wrote:
Hello,
the following (dirty) workaround is a solution (not so smart, but it
works):
sub odb_open_test()
'for a german OOo
title_must_be = "OpenOffice.org Base"
df = Stardesktop.Frames
If RIGHT((df(df.count-1).title), 19) = title_must_be Then
msgbox "this is a Base document"
End if
end sub
I think that code works correctly (under your specific conditions!) in
all cases.
Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]