Welcome to MSDN Blogs Sign in | Join | Help

Programming Office Commandbars - how to disable shortcut menus

This is one of the FAQs about Office Commandbars. For some reason, you may want to suppress the shortcut menus brought up by right-clicking the content of an Office document. This is an example of how to disable them in Word:
 
CustomizationContext = ActiveDocument
Dim bar As CommandBar
For Each bar In CommandBars
    If bar.Type = msoBarTypePopup Then
        bar.Enabled = False
    End If
Next
With little modification, you should be able to do the same thing in Excel, PowerPoint and other Office applications that have the Office Commandbars collection.
Published Thursday, August 12, 2004 7:38 AM by guowu
Filed under: ,

Comments

# Help: Disabling Office 2003 shortcuts

Tuesday, September 14, 2004 6:21 PM by fares.Rihani's .Net blog
Help: Disabling Office 2003 shortcuts
New Comments to this post are disabled
 
Page view tracker