Dňa Ut 23. Január 2007 10:01 Manolis Christodoulou napísal:
> Juraj Trenkler wrote:
> > DΕ?a Po 22. JanuΓ‘r 2007 10:28 Manolis Christodoulou napΓ­sal:
>
> Thank you. The following code worked, and I kind of understand it!
>
> Sub OpenForm()
>       Dim forms as Variant
>       Dim prop(1) as New com.sun.star.beans.PropertyValue
>       forms=ThisComponent.Parent.getFormDocuments()
>       conn=ThisComponent.Parent.DataSource.getConnection("","")
>       prop(0).Name="ActiveConnection"
>       prop(0).Value=conn
>       prop(1).Name="OpenMode"
>       prop(1).Value="open"
>       forms.loadComponentFromURL("MyForm","_blank",0,prop())
> End Sub
>
> But the documentation I found on OOo SDK about the 4th parameter of
> loadComponentFromURL doesn't list any "ActiveConnection" and "OpenMode"
> properties.
>
> Now let me continue. I need to filter "MyForm". Can I do it from
> loadComponentFromURL using some properties?
>
I have made new library just for my application in MyMacros (or something like 
this, I use slovak version). So when I open form from macro in this library I 
can write any macro which could be used by this form. 

Something like

  oForml.ApplyFilter=true
  oForml.Filter="`rodnec` =  "+"'"+sRodnec+"'"  REM sRodnec is Global variable 
 

assign to event when loading form. 

I solved this problem just when I realised that I must use library in MyMacros 
which is always "opened " .so my variables could be read by every document I 
use.  It did not work when I wrote macros inside of forms. They could not be 
seen by other documents. I my experience. :-)

juraj


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to