Hi,
i think, the Scripting Framework needs a 32bit Java JRE installed.
For example, if i remove "C:\Program Files (x86)\LibreOffice
5.1\program\classes\ScriptFramework.jar"
the macro will fail too.
Oliver
Am 14.04.2016 um 19:28 schrieb SOS:
Oliver,
sorry but still the same error
An exception occurred
Type: com.sun.star.script.provider.ScriptFrameworkErrorException
Message: unsatisfied query for interface of type
com.sun.star.script.provider.XScriptProvider!.
- Windows 8
- het scripts are on the machine "C:\Program Files (x86)\LibreOffice
4\share\Scripts\javascript\HelloWorld\helloworld.js"
but in de UI i can also not sea the Java libraries maybe i must enabling
something in the options
to handle java ?
Greetz
On 14/04/2016 19:03, Oliver Brinzing wrote:
Hi,
this will work in LO 4 and LO 5:
OPTION EXPLICIT
Sub oJavaScriptMacro
Dim oMSPF as Object
Dim oSP as Object
Dim oScript as Object
oMSPF =
GetDefaultContext.getValueByName("/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory")
oSP = oMSPF.createScriptProvider("")
' JavaScript Macro
oScript =
oSP.getScript("vnd.sun.star.script:HelloWorld.helloworld.js?language=JavaScript&location=share")
oScript.invoke(Array(), Array(), Array())
End Sub
Regards
Oliver
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice