P
Paul Moloney
I've created two macros in one of the my templates,
"TurnOnToolbars" and "TurnOffToolbars" that respectively
toggle on and off the display of particular toolbars.
The macros are activated by two menu items, "Turn On
N365 Custom Toolbars" and "Turn Off N365 Custom Toolbars",
only one of which is displayed at any time; the display of
these menu items are also toggled on and off by the macros.
(For example, the "TurnOnToolbars" macro also hides the
"Turn On N365 Custom Toolbars" menu items, and
reveals the "Turn Off N365 Custom Toolbars" menu item.)
However, when a user uses these macros in a document
based on this template, and then attempts to save the
document, they are prompted to also save the template.
Do you know why this is happening?
(One of the macros is show below as an example)
Thanks,
P.
Sub TurnOnToolbars()
'Macro created July 9th 2003
'Displays the N365 Toolbars
CommandBars("N365 Macros").Visible = True
CommandBars("N365 RFP").Visible = True
CommandBars("N365 Styles").Visible = True
Dim cbr As CommandBarControl
Set cbr = CommandBars("Menu Bar").Controls("N365 Macros"). _
CommandBar.Controls("Turn On N365 Custom Toolbars")
cbr.Visible = False
Set cbr = CommandBars("Menu Bar").Controls("N365 Macros"). _
CommandBar.Controls("Turn Off N365 Custom Toolbars")
cbr.Visible = True
End Sub
"TurnOnToolbars" and "TurnOffToolbars" that respectively
toggle on and off the display of particular toolbars.
The macros are activated by two menu items, "Turn On
N365 Custom Toolbars" and "Turn Off N365 Custom Toolbars",
only one of which is displayed at any time; the display of
these menu items are also toggled on and off by the macros.
(For example, the "TurnOnToolbars" macro also hides the
"Turn On N365 Custom Toolbars" menu items, and
reveals the "Turn Off N365 Custom Toolbars" menu item.)
However, when a user uses these macros in a document
based on this template, and then attempts to save the
document, they are prompted to also save the template.
Do you know why this is happening?
(One of the macros is show below as an example)
Thanks,
P.
Sub TurnOnToolbars()
'Macro created July 9th 2003
'Displays the N365 Toolbars
CommandBars("N365 Macros").Visible = True
CommandBars("N365 RFP").Visible = True
CommandBars("N365 Styles").Visible = True
Dim cbr As CommandBarControl
Set cbr = CommandBars("Menu Bar").Controls("N365 Macros"). _
CommandBar.Controls("Turn On N365 Custom Toolbars")
cbr.Visible = False
Set cbr = CommandBars("Menu Bar").Controls("N365 Macros"). _
CommandBar.Controls("Turn Off N365 Custom Toolbars")
cbr.Visible = True
End Sub