For the forms used in the net I found this:
Code: Select all
Sub Close_Forms
Dim oForm As Object
Rem... This component hack
oForm = thisComponent.Parent.FormDocuments
if oForm.HasByName("fMAIN") then
oForm = oForm.getByName("fMAIN")
if not IsNull(oForm.Component) then
oForm = ThisComponent.Drawpage.Forms.getByName("fMAIN")
End if
Else
msgbox "Form Not Found"
End if
oForm.parent.parent.CurrentController.Frame.close( true ) Rem... this way so dosen't close wrong form because of timing.
'thisComponent.CurrentController.Frame.close( true ) Rem.. This line commented out. Could close wrong form if you clicked to another too quickly
End SubCode: Select all
Sub CallTerminateOpen()
stardesktop.terminate
End SubI use Windows Vista Home Premium and OpenOficce 3.0.1
Does someone can give me a hand?
Advance grateful