Microsoft KB Archive/309136

From BetaArchive Wiki

Article ID: 309136

Article Last Modified on 2/16/2006



APPLIES TO

  • Microsoft Office XP Professional Edition
  • Microsoft Office XP Small Business Edition
  • Microsoft Office XP Standard Edition
  • Microsoft Office XP Standard Edition for Students and Teachers
  • Microsoft Office XP Developer Edition
  • Microsoft Access 2002 Standard Edition
  • Microsoft Excel 2002 Standard Edition
  • Microsoft FrontPage 2002 Standard Edition
  • Microsoft Outlook 2002 Standard Edition
  • Microsoft PowerPoint 2002 Standard Edition
  • Microsoft Word 2002 Standard Edition



This article was previously published under Q309136

SUMMARY

You can create a system policy to remove a custom command and its corresponding toolbar button from a Microsoft Office XP program. For example, you can remove a command that was created by a custom program that is installed on users' computers. This article describes how you can disable a custom command and toolbar button by using a system policy setting.

back to the top

Disable a Custom Menu Command and Toolbar Button by Using a System Policy Setting

In order to disable a custom command or toolbar, you must know the control ID of the menu command or toolbar button that you want to disable. In many cases, predefined menu commands across Office programs share the same control ID; therefore, you can try to turn off a menu command by using the same control ID as found in another program.

You can disable custom menu commands and toolbar buttons, even if they are not defined within a policy template. If you have the control ID, you can remove any menu command or toolbar within the program.

To disable a custom menu command and toolbar button with a policy:

Microsoft Windows NT

  1. Start the System Policy Editor. Create a new policy file, or open an existing policy file.
  2. Double-click the Default User policy profile icon.
  3. Expand the Office application node that contains the item for which you want to configure a policy. To do this, click the plus (+) sign, or double-click the program name.
  4. Expand the Disable items in user interface node. Expand the Custom node.
  5. Select the Disable command bar buttons and menu items check box.
  6. In the Settings for command bar buttons and menu items work area, click Show.
  7. In the Show Contents box, click Add. In the Add Item box, type the control ID for the menu and toolbar item.

Microsoft Windows 2000 or Microsoft Windows XP, Using Group Policy Snap-in

  1. Click Start, point to Run, and then type MMC. Click OK.
  2. On the Console menu, click Add/Remove Snap-In.


If you are running Windows XP, click Add/Remove Snap-In on the File menu.

  1. In the Add/Remove Snap-In dialog box, click Add on the lower left.
  2. In the list of snap-ins, double-click Group Policy, and then click Finish.
  3. Click Close. Click OK in the Add/Remove Snap-In dialog box.
  4. In the Console root under Local Computer Policy, expand User Configuration.
  5. Expand Administrative Templates, and then examine the templates that are currently installed.
  6. Right-click Administrative Templates, and then click Add/Remove Templates.
  7. Click Add and then double-click the Office program template (*.adm) that you want to modify.
  8. In the Add/Remove Templates dialog box, click Close.
  9. Expand the program template that you just added under Administrative Templates.
  10. Expand Disable items in user interface, and then click Custom.
  11. Double-click Disable command bar buttons and menu items.
  12. Click Enabled, and then click Show.
  13. Click Add, type the control ID for the item that you want to disable, and then click OK.
  14. In the Show Contents dialog box, click OK, and then click OK again in the Disable command bar buttons and menu items Properties dialog box.
  15. On the Console menu, click Saveto save the console that you created.


If you are running Windows XP, click Save on the File menu to save the console.

After you create this policy and place it on your domain controller, when users log on to the network, their logon process will automatically enforce the settings found in the policy file to their computers. For example, a policy that is configured for Excel 2002 would use the information in the policy file to create the following string registry entry on the user's computer:

HKCU\Software\Policies\Microsoft\Office\10.0\Excel\DisabledCmdBarItemsList
Value name: TCIDx
Data type: REG_SZ (string)
Value data: "<control ID>"


When Excel starts, it examines this registry setting and verifies whether values are present. If the entry is "3", the Save menu command is turned off. If the value is later removed from the list, the Save menu command is turned back on.

This is a unique registry entry, because it is a list of TCIDx entries. The x is incremented by 1 for each entry that is added to the list.

Examples of possible TCIDx entries in the registry include:

TCID1 = "3"
TCID2 = "748"
TCID3 = "20"
TCID4 = "21"


back to the top


Keywords: kbhowtomaster KB309136