Hello Everyone,
I am not sure if a similar query has been posted before. However, I couldn't find posts that are related to my issue.
I am trying to execute an OpenOffice macro from command line under a specific ODS module but unsuccessful (command as shown below).
"D:\Program Files (x86)\OpenOffice 4\program\soffice" -invisible -norestore -nologo -nolockcheck -headless "macro:///[extract_of.ods].Standard.Module1.Load_Target (parameter1)"
It works when the macro is copied over to MyMacros (as below).
"D:\Program Files (x86)\OpenOffice 4\program\soffice" -invisible -norestore -nologo -nolockcheck -headless "macro:///Standard.Module1.Load_Target (parameter1)"
However the requirement is for everyone, with access to the server, to be able to execute the macro which is not possible if the macros are under a specific user's modules (unless there is a way to grant permissions).
Please help me resolving this issue. Thank you.
[Solved] Call a macro in a specific module
[Solved] Call a macro in a specific module
Last edited by Hagar Delest on Thu Oct 29, 2015 12:40 am, edited 1 time in total.
Reason: tagged [Solved].
Reason: tagged [Solved].
Open Office 4.1.1
Re: Call a macro in a specific module
I can execute a macro called printSub stored in a Calc document in a library called NewLib, in a module called NewMod from the command line like this
"String to be printed" is a parameter passed to the sub routine. Does something like that work for you?
Code: Select all
"C:\Program Files (x86)\OpenOffice 4\program\soffice" "c:\users\fjcc\desktop\Test.ods" "macro://Test/NewLib.NewMod.printSub(String to be printed)"
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Call a macro in a specific module
Thank you.
I have managed to resolve this by manually setting up the libraries. The steps I have followed:
a. edited .xlc files under basic folder to include my Library (ex: Targets).
b. created the library folder (Targets) under basic and added .xlb and .xla files
Finally able to call macro using:
"D:\Program Files (x86)\OpenOffice 4\program\soffice" -invisible -norestore -nologo -nolockcheck -headless "macro:///Targets.ExtractTargets.Extract_Target (parameter1)"
where Targets -> library folder name
ExtractTargets -> .xba configuration file name
Extract_Target -> Macro
Thanks.
I have managed to resolve this by manually setting up the libraries. The steps I have followed:
a. edited .xlc files under basic folder to include my Library (ex: Targets).
b. created the library folder (Targets) under basic and added .xlb and .xla files
Finally able to call macro using:
"D:\Program Files (x86)\OpenOffice 4\program\soffice" -invisible -norestore -nologo -nolockcheck -headless "macro:///Targets.ExtractTargets.Extract_Target (parameter1)"
where Targets -> library folder name
ExtractTargets -> .xba configuration file name
Extract_Target -> Macro
Thanks.
Open Office 4.1.1