Hallo,

I need confirmation if a java script or macro can no longer (sinds (LO 4) been called from a basic macro who was running fine on LO 3
using 4.4 I get a error calling the script:
oScript = oSP.getScript("vnd.sun.star.script:Library1\Macro1.js?language=JavaScript&location=user")

the script is located under windows:

I made manually the directorys under Users\[UserName]\AppData\Roaming\LibreOffice\3\user\

"Scripts" directory
"JavaScript" directory
"Library1" directory with the Macro1.js file inside

C:\Users\[UserName]\AppData\Roaming\LibreOffice\3\user\Scripts\JavaScript\Library1\Macro1.js

the compleet examle from the "openoffice3.web.fc2.com" website:

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:Library1\Macro1.js?language=JavaScript&location=user")
' Macro実行
oScript.invoke( array(),array(),array())
End Sub

Thanks for any help

Fernand

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to