by FJCC » Thu Jan 19, 2017 7:57 pm
Here is an example of controlling the document's status bar with a macro. I copied it from this
post in the Spanish forum. I translated the comments.
- Code: Select all Expand viewCollapse view
Sub ControlarAplicacion4()
Dim oBarraEstado As Object
Dim co1 As Integer
'Referencia a la barra de estado del documento activo, Reference the active document's status bar
oBarraEstado = ThisComponent.getCurrentController.StatusIndicator
'Establecemos el texto inicial y el limite de la barra de progreso, Set the initial text and limit of the status bar
oBarraEstado.start( "Procesando Líneas ", 10 )
For co1 = 1 To 10
'Establecemos el valor de la barra de progreso, Set the status bar value
oBarraEstado.setValue( co1 )
'Y el texto, and the text
oBarraEstado.setText( "Procesando la línea: " & co1 )
'Esperamos un segundo, Wait one second
Wait 1000
Next
'Es importante finalizar la barra de estado para devolverle el control a la aplicación
'It is important to end the status bar process to return control to the application
oBarraEstado.end()
End Sub
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.