Code
Sub vklopiizklopi()
With CommandBars("VSE")
If .Visible = True Then
.Visible = False
CommandBars("Izklopi").Controls(1).State = msoButtonUp
CommandBars("Izklopi").Controls(1).Caption = "ON/OFF izklopjen"
CommandBars("Izklopi").Controls(1).TooltipText = "preverjanje kod izklopljeno"
Else
If .Visible = False Then
.Visible = True
CommandBars("Izklopi").Controls(1).State = msoButtonDown
CommandBars("Izklopi").Controls(1).Caption = "ON/OFF"
CommandBars("Izklopi").Controls(1).TooltipText = "preverjanje kod vklopljeno"
End If
End If
End With
Exit Sub
End Sub
Display More
Ok I have mangaed to change apperance of buttons with this code but now each time I use it and then close the word it asks me if I want to save changes to .dot file (It wants to save changes to template.
I guess it is because this changing of button appearance how could I avoid this message
And is it possible that instead of use caption to change the button text, to change the button color to red or blue
Thnx