Is it possible to launch the macros window with a batch file?
I mean this macro window https://i.imgur.com/wGjTtYt.png
Is it possible to launch the macros window with a batch file?
I mean this macro window https://i.imgur.com/wGjTtYt.png
Hmmm…
Yes. Of course, I didn’t know. Since I somhow like bizarre ideas, I researched and tested.
I couldn’t find an API function by which the soffice.exe creating the start panel could do it. But there is a .uno:
command to the wanted effect. However, to call and run it you need a frame supporting the DispatchHelper. During startup of soffice there is none. Thus you need to create a dummy component with its frame exclusively for running the uno command - and then to die again.
Suppose you hava module zz_crazy
in your local Standard
library for Basic scripts, and therein the following Sub:
Sub openBasicIDE()
Dim args(0) As New com.sun.star.beans.PropertyValue
args(0).Name = "Hidden"
args(0).Value = True
dummy = StarDesktop.loadComponentFromURL("private:factory/smath", "_blank", 0, args)
fr = dummy.CurrentController.Frame
disp = createUnoService("com.sun.star.frame.DispatchHelper")
disp.executeDispatch(fr, ".uno:BasicIDEAppear", "", 0, Array())
dummy.close(True)
End Sub
On a Win-64 machine with default paths the commandline
"C:\Program Files\LibreOffice\program\soffice.exe" macro:///standard.zz_crazy.openBasicIDE
should then run LibreOffice with the Basic IDE in the sole frame.
Of course, there can be complications. Suppose you have assigned macro(s) to events occurring during startup or during component creation, this may …