Deploying a Customized Ribbon and Quick Access Toolbar in Office 2010

04/27/2015

10 minutes to read

In this article

Summary: Deploying a customized Ribbon and Quick Access Toolbar is an often requested action for developers and administrators. Learn how to deploy a customized Microsoft Office UI to users, place the file at a particular location, and restrict further customizations. (8 printed pages)

Overview of Deploying Custom Fluent User Interface Files

The Microsoft Office Fluent User Interface (UI) includes the Ribbon and the Quick Access Toolbar. These items are customized by using XML to define the components of the UI and with programming code, also known as callback procedures, to give the components their functionality. Customizing the UI is simply a matter of updating the XML and, optionally, updating or adding new callback procedures.

You can add the updated XML to a single program file by modifying the Microsoft Office Open XML file. This is completed by opening the file as a Zip package, inserting a part that contains the XML, and then updating the relationship part so that it is recognized as part of the package. You can also add the updated XML to the Office 2010 application so that the customized UI is available in any file opened in the application. You can do this by creating a COM add-in that loads when the application starts.

You can also customize the UI by placing an *.officeUI file in a specific location on a user’s computer. Then, the next time that the user starts the application, the customized UI is displayed.

This article provides an example of a customization file and how it is deployed to a group of users. It also demonstrates how you can restrict further customization to the UI files after deployment.

Deploying the User Interface to a Wide Range of Users

Assume that you have customized the UI in your Office 2010 application. What if you want the customized UI to be distributed to a wide range of users? How do you do this? When you customize the UI in a particular application, Office 2010 creates an *.officeUI file for that application that contains the customization XML. With this understanding, you can do one of the following.

Modify an existing *.officeUI file with the desired customizations by updating the XML code.

Create the desired customizations by using the Customization dialog in the Microsoft Office application, apply the customizations, and then browse to the *.officeUI file.

Note

If you reset the UI customizations to the default, the *.officeUI file is replaced.

When the *.officeUI file is available, you can then use a script to load the file onto the user’s computer upon log in. An example of this kind of script is presented later in this article.

Note

Any customizations to the Ribbon UI or Quick Access Toolbar are removed when the new *.officeUI file is loaded.

The value of the "*" depends on the particular Office 2010 application as seen in the following table.

To import a *.exportedUI customization file

Click Import/Export, and then click Import customization file. Navigate to the *.exportedUI you created previously.

Example of an *.exportedUI UI Customization File

The following listing is an example of an *.exportedUI customization file for Microsoft Excel.

Note

The difference between the *.exportedUI and the *.officeUI files is that a metadata tag (<mso:cmd>) is added to the *.exportedUI file. If an *.exportedUI file is incorrectly identified and is placed in the \AppData\ directory as an *.officeUI file, then the file would fail to parse and not apply any customizations.

The XML code adds custom tabs with various controls. It also hides several built-in tabs.

Using Scripts to Place the UI Customization Files

As stated previously, you can use operating system scripts to place the *.officeUI file onto the user’s computer. These scripts are run when the user logs on to her computer. The exact location of the file depends on whether the policy regkey is set on the user’s computer. The *.officeUI file is located at one of the following locations.

rem A basic script to copy .officeUI files from a network share into the user's local AppData directory, if no .officeUI file currently exists there.

rem Can easily be modified to use the roaming AppData directory (replace %localappdata% with %appdata%) or to include additional ribbon customizations.

setlocal

set userdir=%localappdata%\Microsoft\Office

set remotedir=\\MyServer\LogonFiles\public\OfficeUI

for %%r in (Word Excel PowerPoint) do if not exist %userdir%\%%r.officeUI cp %remotedir%\%%r.officeUI %userdir%\%%r.officeUI

endlocal

Using Administrative Policies to Restrict UI Customizations

During deployment of the *.officeUI customization file, you can also use administrative policies to further restrict customization of the UI. The following table summarizes the administrative policies that you can set for UI customizations.

Table 2. Administrative Policies for UI customization

Policy

Description

New for Office 2010 or Existing Policy

Affects Ribbon or Quick Access Toolbar

Turn off user customizations via UI

This policy setting prevents users from customizing both the Quick Access Toolbar and Ribbon through the user interface (UI).

This policy setting does not affect existing customizations that load when the application starts, or load when an associated document or template is opened.

If you enable this policy setting, the following UI entry points are turned off: the Quick Access Toolbar and Ribbon tabs in the application's Office Center dialog box, and the Quick Access Toolbar and Ribbon customization options on the right-click menu on the Ribbon.

If you disable or do not configure this policy setting, users can customize the Quick Access Toolbar and Ribbon through both the application’s Office Center dialog box, and the right-click menu on the Ribbon.

Existing

Both

Turn off all user customizations

This policy setting prevents users from making any Quick Access Toolbar and the Ribbon customizations. This includes customizations made through user interface (UI) entry points, or loaded from documents or templates. Existing customization files do not load when the application starts.

If you enable this policy setting, users cannot customize the Quick Access Toolbar and Ribbon through either the Quick Access Toolbar and Ribbon tabs in the application's Office Center dialog box, or the right-click menu on the Ribbon. In addition, Quick Access Toolbar and Ribbon customizations originating from documents or templates are not loaded when these documents are opened. In addition, existing customization files (*.officeUI) are not loaded when the application starts. Users will be unable to Import a Customization file (*.exportedUI).

If you disable or do not configure this policy setting, users can make Quick Access Toolbar and Ribbon customizations through the UI and load them from documents and templates, or customization files.

Existing

Both

Disable UI extending from documents and templates

This policy setting controls whether Office 2010 applications load any custom user interface (UI) code included with a document or template. The Office 2010 release enables you to extend the UI with customization code that is included in a document or template.

If you enable this policy setting, Office 2010 applications cannot load any UI customization code included with documents and templates.

If you disable or do not configure this policy setting, Office 2010 applications load any UI customization code included with a document or template when you open it.

Existing

Not applicable

Allow roaming of all user customizations

This policy setting allows roaming of both the Quick Access Toolbar and Ribbon customizations.

If you enable this policy setting, users' Quick Access Toolbar and Ribbon customizations will be available to them on any computer on their network when they log on.

If you disable or do not configure this policy setting, users' Quick Access Toolbar and Ribbon customizations will only be available to them on the computer on which they made the customizations.

New

Both

You can follow these steps to set or clear the administrative policies related to the Microsoft Office Fluent User Interface.

To customize the Administrative Policies for the User Interface in Windows Server 2008 R2

Open the Group Policy Management Console. Right-click the Group Policy object that you want to edit and then click Edit.

In the console tree, under User Configuration, expand Administrative Templates.

Conclusion

Customizations to the Microsoft Office Fluent UI are saved by Office 2010 in a file that has the extension *.officeUI. You can deploy these files to users by using operating scripts which are run when the user logs on to his or her computer. The location of the file is determined by whether the policy regkey is on the user’s profile. You can restrict further customizations of the deployed UI by setting administrative policies.

Additional Resources

For more information about the topics discussed in this article, see the following resources: