Hello Ariel,

Thanks for your answer.

Now I understand how to work with UIConfigureManager. And I have once more
question.
I your sample, you remove some settings, and then insert all the rest.

If nIndex >= 0 Then
>     oToolbarSettings.removeByIndex(nIndex)
>     If bCreate Then
>         oUIConfigurationManager.insertSettings(sResourceURL,
> oToolbarSettings)
>     Else
>         oUIConfigurationManager.replaceSettings(sResourceURL,
> oToolbarSettings)
>     End If
>     'make changes persist at the doc storage, NOT globally!!!
>     oUIConfigurationManager.store()
> End If


But I try to change "IsVisible" property and then replace settings

If nIndex >= 0 Then
>     Dim oToolBarButton() As Object
>     Dim nToolBarButtonCount As Integer
>     Dim j As Integer
>     oToolBarButton() = oToolbarSettings.getByIndex(nIndex)
>     nToolBarButtonCount = ubound(oToolBarButton())
>     for j = 0 to nToolBarButtonCount
>         If oToolBarButton(j).Name = "IsVisible" Then
>              oToolBarButton(j).Value = "false"
>         End If
>     next j
>     oToolbarSettings.replaceByIndex(nIndex, oToolBarButton())
>     If bCreate Then
>         oUIConfigurationManager.insertSettings(sResourceURL,
> oToolbarSettings)
>     Else
>         oUIConfigurationManager.replaceSettings(sResourceURL,
> oToolbarSettings)
>     End If
>     'make changes persist at the doc storage, NOT globally!!!
>     oUIConfigurationManager.store()
> End If
>

And this code does not work. Do you know why?

Thank you in advance for your kind reply

-- 
-- 
.''`.   With best regards,
: :' :  Alexander Anisimov
`. `'   JID [email protected]
  `-    Debian - when you have better things to do than fixing systems

Reply via email to