J
Jase
Hi all,
I would like to alter a custom commandbar in word depending on values stored
in the currently opened document. this bit I can do except that the
commandbar always changes for all the currently open documents. does anyone
know if its possible?
I've been trying with variations on this: (other detail omitted)
Application.CustomizationContext = ThisDocument
Set myCommandBarButton =
ActiveDocument.CommandBars.FindControl_(Type:=msoControlButton, tag:=tag)
If Not myCommandBarButton Is Nothing Then myCommandBarButton.Delete
Set myCommandBarButton = ActiveDocument.CommandBars("mycommandbar")
_.Controls.Add(Type:=msoControlButton)
this appeared to work for a while but I suspect it was just word being flakey.
I've also tried various attempts with creating/deleting commandbars instead
of buttons but to no avail.
any thoughts greatfully accepted.
thanks in advance.
I would like to alter a custom commandbar in word depending on values stored
in the currently opened document. this bit I can do except that the
commandbar always changes for all the currently open documents. does anyone
know if its possible?
I've been trying with variations on this: (other detail omitted)
Application.CustomizationContext = ThisDocument
Set myCommandBarButton =
ActiveDocument.CommandBars.FindControl_(Type:=msoControlButton, tag:=tag)
If Not myCommandBarButton Is Nothing Then myCommandBarButton.Delete
Set myCommandBarButton = ActiveDocument.CommandBars("mycommandbar")
_.Controls.Add(Type:=msoControlButton)
this appeared to work for a while but I suspect it was just word being flakey.
I've also tried various attempts with creating/deleting commandbars instead
of buttons but to no avail.
any thoughts greatfully accepted.
thanks in advance.