Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.