I had written a java macro. I have tested it seperately and it works correctly.
The JAVA macro is placed in C:\Program Files (x86)\OpenOffice 4\share\Scripts\java\CalledFromBasic folder and with the jar as CalledFromBasic.jar.
I am trying to call this from openoffice BASIC macro, for which the code is as follows.
Code: Select all
Sub Main
MSPF = createUnoService("com.sun.star.script.provider.MasterScriptProviderFactory")
scriptPro = MSPF.createScriptProvider("")
xScript = scriptPro.getScript("vnd.sun.star.script:TestCallFromBasic.test?language=java&location=share\Scripts\java\CalledFromBasic")
Thing = xScript.Invoke()
End Sub
From http://www.openoffice.org/api/docs/comm ... #getScript I know that I need to give 2 parameters.
I'm not able to figure out how to call using getScript.
Can anyone help ?