Am Dienstag, den 23.12.2008, 12:06 +0100 schrieb Fernand Vanrie: > Hallo All, > > I trye to pass a nwe connection to a already opened form document who > contains the macro a running from. > > So i have a Base Doc with 2 Form Docs. > > Mi macro resists and is run from formdoc1 with the macro I trie to pass > a new connection to formdoc1 > > with the use of the function below i can easly pass a new connection to > my not opened Formdoc2 But using this function (sort of "reloading"of > Formdoc1 ) passes but the connection is not changed. > > 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 = MynewConnection > aProp(1).Name = "OpenMode" > aProp(1).Value = "open"
Try using > OpenForm = .loadComponentFromURL(sFormname,"_blank",0,aProp()) "_default" here. According to the dev guide "_blank" requests a new blank frame, "_default" reuses the already open one. > end function > > > so: Can I change the Activeconention in my Formdoc1 ? > > thanks for any hint > Fernand HTH, and have a merry christmas without too much work ;), Marc --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org