| Summary: | There is no documentation in the help on how to open a file and automatically run a macro | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Alan <grokit> |
| Component: | Documentation | Assignee: | tagezi <lera.goncharuk> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | lera.goncharuk |
| Priority: | medium | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=100836 https://bugs.documentfoundation.org/show_bug.cgi?id=133932 |
||
| Whiteboard: | target:5.4.0 | ||
| Crash report or crash signature: | Regression By: | ||
|
Description
Alan
2016-12-06 16:18:03 UTC
I confirm it. tagezi committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2c9972b8d40dce72cc6f56f1d44db838bd0ece10 tdf#104441 Addition to output to the console help It will be available in 5.4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. This patch was for output to the console. For online and build-in Help it was added in https://gerrit.libreoffice.org/gitweb?p=help.git;a=commitdiff;h=47ad5a2f2102740bda4cf02dcd73562da79f67a9 So, I think that it is fixed. If you have any comments, I am ready to listen. I wanted to amend the information as available on http://www.script-coding.com/OOo/OOo_HelloWorld.html: You can execute a macro from a command line, like this: > soffice -invisible macro:///standard.module1.mymacro Here "standard" is a name of a library from "My macros" container, "module1" - module name, "mymacro" - name of function (sub) of macro itself. This will start a LibreOffice process, which will execute the macro and exit. You can start a macro of a specific document at its opening from a command line: > soffice path/to/test.odt macro://./standard.module1.mymacro If e.g. test1.odt document is already opened, this command line will also work: > soffice macro://test1/standard.module1.mymacro A macro may be executed from another macro code (using similar URLs), like this: oDisp = createUnoService("com.sun.star.frame.DispatchHelper") sMacroURL = "macro:///standard.module1.mymacro" oDisp.executeDispatch(StarDesktop, sMacroURL, "", 0, Array()) |