Hi,
Yes,We can do this programmatically. In code behind, we need to get reference of that button and then disable that button. Every UI control has defined #. You have to use that number to get handle for that control and then call disable on that. I am sending you list # for each toolbar button and menu item.
http://msdn2.microsoft.com/en-us/library/aa192513(office.11).aspx
Currently I am aware of only this method. If I get simpler method I will let you know. if u get pls let me know.
Viju