Code: Select all
REM Generic macros needed to open any form
function OpenForm( formContainer as variant, oConnection as variant, sFormName as string) as variant
Dim aProp(1) As New com.sun.star.beans.PropertyValue
aProp(0).Name = "ActiveConnection"
aProp(0).Value = oConnection
aProp(1).Name = "OpenMode"
aProp(1).Value = "open"
OpenForm = formContainer.loadComponentFromURL(sFormName,"_blank",0,aProp())
end function
function getFormsTC() as variant
getFormsTC = thisComponent.Parent.getFormDocuments
end function
function getConnectionTC() as variant
getConnectionTC = thisComponent.Drawpage.Forms(0).ActiveConnection
end function
sub OpenForm_Button_Click( oev as variant )
sFormName = oev.Source.Model.Tag
OpenForm( getFormsTC, getConnectionTC, sFormName )
end sub
but I get all the forms opened in a new window... I guess this is due to the _blank argument...
I've tried replacing it with _self or _parent, but nothing happened... help?