[dev] Re: How to create OOo Basic scripts via API

2006-11-16 Thread Andreas Saeger
Matthias B. wrote: Hallo, I've checked the Dev Guide and the IDL docs but I can't seem to find any services/interfaces that allow me to create/edit Basic scripts included in a document via the UNO API. It would be nice if someone could point me in the right direction. Matthias Hi, Matthias B.

[dev] Re: How to create OOo Basic scripts via API

2006-11-17 Thread Andreas Saeger
Matthias B. wrote: On 11/16/06, Andreas Saeger <[EMAIL PROTECTED]> wrote: [...] oDocLibs = oDoc.BasicLibraries oLib = oDocLibs.createLibrary("testLib") [...] Does this help? Thanks. I'm trying to do this from Java. I've checked the IDL docs and it seems that createLibrary() is provided by XS

[dev] Re: How to create OOo Basic scripts via API

2006-11-17 Thread Andreas Saeger
Forgot: If everything fails, you may consider a Basic-macro to be called from your Java with appropriate parameters. Add some arguments, error-handling and If oDocLibs.hasByName(sLibName) then ... If oLib.hasbyName(sModuleName) then ... to my code. -

Re: [dev] Re: How to create OOo Basic scripts via API

2006-11-17 Thread Kai Sommerfeld
Hi all, Andreas Saeger wrote: > Matthias B. wrote: [...] > Sub mkNewDocWithMacro() > oDoc = > Stardesktop.loadComponentFromURL("private:factory/swriter","_default",0,Array()) > > oDocLibs = oDoc.BasicLibraries > oLib = oDocLibs.createLibrary("testLib") > sCode = "REM * BASIC *"& Chr(1

Re: [dev] Re: How to create OOo Basic scripts via API

2006-11-17 Thread Carsten Driesner
Kai Sommerfeld wrote: Hi all, Andreas Saeger wrote: Matthias B. wrote: [...] Sub mkNewDocWithMacro() oDoc = Stardesktop.loadComponentFromURL("private:factory/swriter","_default",0,Array()) oDocLibs = oDoc.BasicLibraries oLib = oDocLibs.createLibrary("testLib") sCode = "REM * BASIC **

Re: [dev] Re: How to create OOo Basic scripts via API

2006-11-17 Thread Matthias B.
On 11/16/06, Andreas Saeger <[EMAIL PROTECTED]> wrote: [...] oDocLibs = oDoc.BasicLibraries oLib = oDocLibs.createLibrary("testLib") [...] Does this help? Thanks. I'm trying to do this from Java. I've checked the IDL docs and it seems that createLibrary() is provided by XStarBasicAccess, howe

Re: [dev] Re: How to create OOo Basic scripts via API

2006-11-18 Thread Christoph Lutz
Hi Matthias, On 11/17/06, Matthias B. <[EMAIL PROTECTED]> wrote: Thanks. I'm trying to do this from Java. I've checked the IDL docs and it seems that createLibrary() is provided by XStarBasicAccess, however the "Use" references of that interface are empty, so I have no idea what object/service