S
Starbird
I have a template (in 2003) that has 3 custom menus in it. I need two of the
menus to be invisible if a user is an operator rather than developer. I have
an option upon opening the document to select either operator or developer.
When they select operator, I need 2 of the menus to be disabled and
invisible.
I located some code that looks like the following:
Word.CommandBars("MyTools MenuBar OP_Temp").Visible = False
Word.CommandBars("MyTools MenuBar OP_Temp").Enabled = False
Word.CommandBars("Formatting Toolbar Holder OP_Temp").Visible = False
Word.CommandBars("Formatting Toolbar Holder OP_Temp").Enabled = False
It errors out saying I am using an invalid command with "MyTools MenuBar
OP_Temp". I have tried a couple different things such as spacing between
Menu and Bar, using this as my foundation, but I'm getting nowhere.
I also tried writing a macro using the recorder to get the code from there.
It actually provides the desired end result but I'm afraid it's a very poor
way to resolve my issue and may create more problems than it's worth since it
doesn't reference the menu by name but by #. That code is:
CommandBars ("Menu Bar").Controls(12).delete
Any suggestions or insight would be greatly appreciated!!
Thanks!
SRD
menus to be invisible if a user is an operator rather than developer. I have
an option upon opening the document to select either operator or developer.
When they select operator, I need 2 of the menus to be disabled and
invisible.
I located some code that looks like the following:
Word.CommandBars("MyTools MenuBar OP_Temp").Visible = False
Word.CommandBars("MyTools MenuBar OP_Temp").Enabled = False
Word.CommandBars("Formatting Toolbar Holder OP_Temp").Visible = False
Word.CommandBars("Formatting Toolbar Holder OP_Temp").Enabled = False
It errors out saying I am using an invalid command with "MyTools MenuBar
OP_Temp". I have tried a couple different things such as spacing between
Menu and Bar, using this as my foundation, but I'm getting nowhere.
I also tried writing a macro using the recorder to get the code from there.
It actually provides the desired end result but I'm afraid it's a very poor
way to resolve my issue and may create more problems than it's worth since it
doesn't reference the menu by name but by #. That code is:
CommandBars ("Menu Bar").Controls(12).delete
Any suggestions or insight would be greatly appreciated!!
Thanks!
SRD