Hi all,
Whenever some settings like eg language changes, LO displays a Restart message, goes down and restarts with the last file. Anyone knows the corresponding command for a macro?
Thanks
LibreOffice Restart command
LibreOffice Restart command
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
Re: LibreOffice Restart command
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: LibreOffice Restart command
Thanks JeJe,
does this mean I need to import"XRestartManager.idl"; into the odb and then just call the function via a sub ?
cheers
does this mean I need to import"XRestartManager.idl"; into the odb and then just call the function via a sub ?
cheers
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
Re: LibreOffice Restart command
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: LibreOffice Restart command
@JeJe ,thanks for that, rolling up my sleeves.
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
Re: LibreOffice Restart command
Since I needed this feature too, here is a macro for BASIC that restarts LibreOffice.
Code: Select all
' Restart LibreOffice
' 28/02/2023
Sub RestartLO
Dim Context as Variant
Context = GetDefaultContext()
Dim RestartManager as Variant, Handler as Variant
RestartManager = Context.getValueByName("/singletons/com.sun.star.task.OfficeRestartManager")
If Not RestartManager.isRestartRequested(False) Then
' Avoid error "The window cannot be closed while BASIC is running"
On Error Resume Next
' Restart LibreOffice
RestartManager.requestRestart(Handler)
End If
End Sub
LibreOffice 7.5.x on Ubuntu