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
- Start the System Policy Editor. Create a new policy file,
or open an existing policy file.
- Double-click the Default User policy profile icon.
- 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.
- Expand the Disable items in user interface
node. Expand the Custom node.
- Select the Disable command bar buttons and menu
items check box.
- In the Settings for command bar buttons and menu
items work area, click Show.
- 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
- Click Start, point to Run, and then type MMC. Click OK.
- On the Console menu, click Add/Remove Snap-In.
If you are running Windows XP, click Add/Remove Snap-In on the File menu. - In the Add/Remove Snap-In dialog box, click Add on the lower left.
- In the list of snap-ins, double-click Group Policy, and then click Finish.
- Click Close. Click OK in the Add/Remove Snap-In dialog box.
- In the Console root under Local Computer Policy, expand User Configuration.
- Expand Administrative Templates, and then examine the templates that are currently
installed.
- Right-click Administrative Templates, and then click Add/Remove Templates.
- Click Add and then double-click the Office program template (*.adm) that you
want to modify.
- In the Add/Remove Templates dialog box, click Close.
- Expand the program template that you just added under Administrative Templates.
- Expand Disable items in user interface,
and then click Custom.
- Double-click Disable
command bar buttons and menu items.
- Click Enabled, and then click Show.
- Click Add, type the control ID for the item that you want to disable, and
then click OK.
- 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.
- 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