Run Macro from Command Line

Bug Ref

@mikekaganski, Can I ask you just one more thing? I’m trying to open this dummy,odt file that I created which is just a black file in background (no GUI) but it doesn’t work as well…

soffice --headless --invisible --nologo “C:\Users\nuno\AppData\Roaming\dummy.odt”

Thanks

Doesn’t work in what way?

It launch the file normally…it bring the window to the front! Maybe I’m wrong but I was expecting to run the file without actually see it.

In 6.3, it runs without displaying anything; but I remember 6.2 working the way you describe. However, in no version will you succeed in calling LO with --headless, and then have something opened and properly working interactively: the --headless is designed for server mode, and even if it would open something visible, it would prevent dialogs, and many more. So - if you want the program to run interactively, then don’t use --headless. And yes, you likely won’t be able to open a document hidden that way.

Command is “Call”. If I’m understand the question aright, I call up other macro’s or sub’s, in other sub’s, by the command “call” then the name of sub or macro. If a crated macro (sub) is named “Open_Box_2”, I type a line in a sub… Call “Open_Box_2”. But all that is done, works, when all sub’s (or macro’s) are in the same file.

@MarkMcLean, that’s not what I want…I want to run the macro from a console command line, not call it from another Sub.

Thanks