fabrizio venerandi wrote:
oggi ho provato ad aprire uno dei miei form con Oo 2.0 per macintosh e
in effetti parrebbe che non ci sia un comando automatico per 'apri
formulario' il che è abbastanza assurdo, si possono aprire form esterni
al db ma non quelli interni. non ho potuto fare ulteriori analisi perché
oo 2.0 per macintosh è un crogiolo di bug, almeno nella gestione dei
form faceva cose assurde.
Premetto che non e' farina del mio sacco, l' ho trovata qui :
http://www.comunecampagnano.it/htm/libri_ebook_guide_e_corsi.htm
La mail va' a capo dopo 72 caratteri quindi la macro la devi aggiustare.
' Qui gli passi il nome del file .odb e qui il nome
del formulario
Sub subDisplayForm(sDatabaseName as string, sFormName as string)
Dim oForm
Dim mArgs(1) as new com.sun.star.beans.PropertyValue
oDatabase = fnGetOpenDatabase(sdatabaseName)
oConnection = oDatabase.DataSource.getConnection("","")
mArgs(0).name = "OpenMode"
mArgs(0).value = "open" '"openDesign" ' '"openForMail"
mArgs(1).name = "ActiveConnection"
mArgs(1).value = oConnection
oForm = oDatabase.getFormDocuments.getByName(sFormName)
'oForm.visibilityChanged(true)
oDatabase.getFormDocuments.loadComponentFromURL(sFormName, "_blank",
0, mArgs())
End Sub
function fnGetOpenDatabase(sDatabaseName as string)
oEnum = StarDesktop.getComponents.createEnumeration
while oEnum.hasMoreElements
oPosDB = oEnum.nextElement
if oPosDB.implementationName =
"com.sun.star.comp.dba.ODatabaseDocument" then
'msgbox oPosDB.DataSource.name
if right(oPosDB.DataSource.name, len(sDatabaseName)) = sDatabaseName then
fnGetOpenDatabase = oPosDB
exit function
end if
end if
wend
end function
Ciao Jack
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
DVDNetRent: il primo noleggio on line senza spese di spedizione, per ricevere
comodamente a casa i tuoi DVD preferiti!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=4631&d=21-2
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]