A
Alexey Titov
Hello
I have a template with code in it that creates new command bar button for
current doc:
(code in template)
Private Sub Document_New()
Set objCommandBar = ActiveDocument.CommandBars("Standard")
Set objCommandBarButton_1 = objCommandBar.Controls.Add(msoControlButton,
, , 1, True)
objCommandBarButton_1.Style = msoButtonCaption
objCommandBarButton_1.Caption = "Command 01"
....
Private Sub Document_Close()
objCommandBarButton_1.Delete - not actually needed as button being added
as Temporary, but result is the same
when I create a new doc based on this template and then close it - it asks
me if I want to save the doc itself and then - the template too
I've checked - it asks to save temlate only if I add that command bar
button.
But I add it as a temporary button, and then even if I try to delete that
button on document close - it still asks me to save the template.
How do I make it not to ask about saving the template?
TIA
Alexey
I have a template with code in it that creates new command bar button for
current doc:
(code in template)
Private Sub Document_New()
Set objCommandBar = ActiveDocument.CommandBars("Standard")
Set objCommandBarButton_1 = objCommandBar.Controls.Add(msoControlButton,
, , 1, True)
objCommandBarButton_1.Style = msoButtonCaption
objCommandBarButton_1.Caption = "Command 01"
....
Private Sub Document_Close()
objCommandBarButton_1.Delete - not actually needed as button being added
as Temporary, but result is the same
when I create a new doc based on this template and then close it - it asks
me if I want to save the doc itself and then - the template too
I've checked - it asks to save temlate only if I add that command bar
button.
But I add it as a temporary button, and then even if I try to delete that
button on document close - it still asks me to save the template.
How do I make it not to ask about saving the template?
TIA
Alexey