I found some Macro Code to do this, but it does not show the format of the "sURL" variable that points to the Toolbar?
The name of the ToolBar is "Controls". It is located in my "Timer.ods" Application, which is sitting in my Documents Folder, but when I set the sURL to "Controls", or "Timer.ods.Toolbars.Controls" Nothing happens. What am I doing wrong?
The Macro is shown below:
Code: Select all
Sub ToggleToolbarVisible(oDoc, sURL, prepinac)
Dim oLayout
oLayout = oDoc.CurrentController.getFrame().LayoutManager
Select Case prepinac
Case 0 rem --- hide toolbar
oLayout.hideElement(sURL)
Case 1 rem --- show toolbar
oLayout.showElement(sURL)
Case 2 rem --- switch toolbar
If oLayout.isElementVisible(sURL) Then
oLayout.hideElement(sURL)
Else
oLayout.showElement(sURL)
End If
End Select
End Sub