Remove a MENU ITEM.????

A

Alok

Hi all,
Is their any way i can remove a menu item when my document is opened .

Or if i can disable the Menu Item.Would also do.

Thanks ,
Alok
 
H

Helmut Weber

Hi Alok,

in principle: CommandBars("File").Controls(16).Enabled = False.

But that would apply to the template, not to your document, usually.

And there may be other ways, to execute the specific command.
You could intercept the according macro and make it's
execution dependent of the activedocument.
There are numerous examples here.

I'd rather not remove a control, as that would rise the question,
how to get it back, and it usually effects the attached template.

With lots of preconditions and exceptions, I suppose.

You may find the following helpful.
By the way, there should be a textual representation
of the control's index, but I see no way to get it,
here with my german version.

With CommandBars("File").Controls
For i = 1 To .Count
Debug.Print Format(i, "00 ") & .Item(i).Caption
Next
End With

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top