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(10) sCode =

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, however

[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

[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.