This only works in writer for me on Ubuntu 16/18.04 LO 6.2/3, renaming to j.xcd does not work. Any way I can apply this to Calc also?
I believe you can create a Menu and link rescue macros.
macro example: Sets the default directory.
And disables Save from the toolbar.
sub SalvarDoc
'----------------------------------------------------------------------
dim document, dispatcher as object
Dim Nome As String
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
Nome = InputBox("¿Cual es tu nombre?")
Var1 = Nome
dim args1(1) as new com.sun.star.beans.PropertyValue
args1(0).Name = "URL"
args1(0).Value = "file:///C:/Users/GILBERTO/Downloads/Baixados/" & Var1 &".doc"
args1(1).Name = "FilterName"
args1(1).Value = "MS Word 97"
dispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args1())
end sub
The example has the menu in the file, can be in LibreOffice, for all …
ATTENTION: If you would like to give more details to your question, use edit in question or add a comment below. Thank you.
If the answer met your need, please click on the ball to the left of the answer, to finish the question.