Using System Policies to Disable User Interface Items

Aa832814.spacer(en-us,office.10).gif

Using System Policies to Disable User Interface Items

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

One of the main reasons to use system policies is to prevent your users from changing items in the user interface. By using system policies, you can disable menu commands, toolbar buttons, and shortcut keys so that your users cannot use those options.

Disabling menu and toolbar items

You can use system policies to disable menu commands and their corresponding toolbar buttons. When you disable a menu command and toolbar button through a policy, users cannot use that command or button.

For your users, a menu command that is disabled through a policy appears on the menu, but it is shaded and unavailable. Similarly, a toolbar button that is disabled through a policy appears on the toolbar, but it is unavailable to users.

Several menu commands and toolbar buttons are listed in the Predefined category. These include several commands that administrators frequently disable, such as the Hyperlink command (Insert menu) and the Macro command (Tools menu). If you want to disable any other command in an Office 2000 application, use the Custom category. To disable a menu command and toolbar button in the Custom category, enter the control ID for that item in the System Policy Editor. You can look up the control ID for any command or button in Visual BasicĀ® for Applications (VBA).

Disabling shortcut keys

Many Office commands have corresponding shortcut keys. When you disable the menu command and toolbar button through a policy, users can still press the shortcut key to use that command. To make the option completely unavailable, you must also disable the shortcut key.

For example, suppose that you disable the Insert Hyperlink command in Excel and a user knows that the shortcut key for that command is CTRL+K; the user can still press the shortcut key to insert a hyperlink. To prevent your users from inserting hyperlinks altogether, you must disable the CTRL+K key combination, too.

To disable a shortcut key in the Predefined category of the policy template, select that shortcut key. You can also disable any shortcut key by using the Custom category. To disable a shortcut key in the Custom category, look up the virtual key code for the registry entry corresponding to the shortcut key and then enter the value in the System Policy Editor.

Note   Even when you disable both a menu command and its corresponding shortcut key, the command is still available through VBA. This is by design, so you can create macros that use the command.

See also

You can disable either a predefined or custom menu or a toolbar item. For detailed instructions about disabling a menu or a toolbar button, see How to Disable Menu Commands and Toolbar Buttons.

You can disable either a predefined or custom shortcut key. For detailed instructions about disabling a shortcut key, see How to Disable Shortcut Keys.




Friday, March 5, 1999