I have a calc document linked with an external cvs file (daily updated).
In it, I have a macro that does a number of processing of this data and saves graphs as image files.
I would like to be able to open this file using localc from the command line, have the macro run, the file be saved and then closed.
So I created a MyMacros.Standard.Module1.SaveAndQuit macro
Sub SaveAndQuit () createUnoService ("com.sun.star.frame.DispatchHelper"). executeDispatch (ThisComponent.CurrentController.Frame, ".uno: Save", "", 0, Array ()) ThisComponent.close (true) End Sub
which is well launched by:
localc --invisible --nofirststartwizard --headless --norestore hopital.ods "macro: ///Standard.Module1.SaveAndQuit"
But the Standard.Graphique.SaveGraphe macro of the hospital.ods document is not launched, although it is associated with the saving of the document.
So I would like the macro MyMacros.Standard.Module1.SaveAndQuit to start the macro
Standard.Graphique.SaveGraphe (Call SaveGraphe) but I can’t.
I go around in circles, not knowing if what I want to do is possible or if it wouldn’t be easier.
I hope that my explanations will be sufficiently clear.
Can someone point me in the right direction please?