The Sysadmins

Tips and tricks from the Sysadmins

Deploying Office 2010 Custom Ribbons and Settings via Group Policy

Deploying Office 2010 Custom Ribbons and Settings via Group Policy. This post will detail the process of pushing UI changes out to your Office 2010 clients. It will cover default fonts, margins and changes to the ribbon. I couldn’t find a great deal of information on this subject when I first looked, so hopefully this will help those struggling to find a solution.
 
Custom Ribbons

Configurations made to the ribbon in Office 2010 are stored in .officeUI files, these aren’t created until you modify the default ribbon. Start with a vanilla office install and make the desired changes in the applications you use. Once completed, head over to 'C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Office' where you should find the newly created .officeUI files. For a full list of officeui files and their descriptions click here (from Microsoft). For the purpose of deploying these changes via group policy you will want to copy these up to a share that as accessible to all users.

Default Font, Size and Margins in Word

These are stored in the normal.dotm (previously normal.dot in Office 2003). Open word and make your changes, close word and head to 'C:\Documents and Settings\%username%\Application Data\Microsoft\Templates'. There is one caveat with this, when you first open word it will rename the normal.dotm and create a new template. So you may want to separate the Word section of the script below and reapply the following day. For the purpose of deploying these changes via group policy you will want to copy normal.dotm up to a share that as accessible to all users.

Excel / Outlook Default Font and Size

Excel and Outlook store the font and size settings in the registry.

Outlook -> [HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\MailSettings]
Excel -> [HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel]

Make the changes in Outlook / Excel, close the application and open regedit and browse to the keys above. Right click ‘mailsetting’ or ‘Excel’ and select export, this will give you the .reg to import into other machines. For the purpose of deploying these changes via group policy you will want to copy the .reg files up to a share that as accessible to all users.

Office Gui Regedit

Which brings us to the script to apply these modifications to a client machine. I would set this as a logon script.

Script

REM Check to see if the .officeUI changes have already been made and exits if so (I was running this on new installs, you can remove this if exist if you aren't)

if exist "C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Office\Word.officeUI" goto exit

REM Copies the officeUI which are responsible for setting the ribbon

xcopy "\\server\share\OfficeUI\Word.officeUI" "C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Office\" /Y /I
xcopy "\\server\share\OfficeUI\Excel.officeUI" "C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Office\" /Y /I
xcopy "\\server\share\OfficeUI\olkexplorer.officeUI" "C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Office\" /Y /I
xcopy "\\server\share\OfficeUI\olkmailread.officeUI" "C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Office\" /Y /I

REM Copies over the modified normal.dotm to set margins and fonts

xcopy "\\server\share\OfficeUI\Normal.dotm" "C:\Documents and Settings\%username%\Application Data\Microsoft\Templates" /Y /I

REM Merges the default font registry key for outlook

regedit /s "\\server\share\OfficeUI\OutlookDefaultFont.reg"

REM Merges the default font registry key for excel

regedit /s "\\file1\data\Applic\Microsoft\Office 2010\OfficeUI\ExcelDefaultFont.reg"

:exit
exit

Office UI GPO

Summary

You can now customize your Office 2010 UI which is a great time saver if you deviate from the default.

6 Comments

  1. For Windows 7 the directory needs to be:
    c:\Users\%username%\AppData\Local\Microsoft\Office\

  2. It would probably be easiest to just use the “%UserProfile%” system variable.

  3. If the Client machine already has a different customisation in place how do I merge the customisations or deploy the new one in such a way that Oulook applies the cusomtisation in addition to (rather than in place of) the existing olkexplorer.officeUI?

    • Tom@thesysadmins.co.uk

      June 7, 2012 at 11:10 pm

      Good question.

      There might be scope for appending to the original olkexplorer.officeUI, but it seems kind of messy from a quick play and will leave you with duplicate entries.

      This will append the new .officeUI file text to the original olkexplorer.officeui:

      type newchanges.officeUI >> olkexplorer.officeUI

      From there you will need to remove the following lines, the first line is at the end of the original officeUI file, and the 2nd/3rd are from the start of the appended officeUI. They will be grouped together as below:

      </mso:sharedControls></mso:qat></mso:ribbon></mso:customUI>
      <mso:customUI xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui">
      <mso:ribbon><mso:qat><mso:sharedControls>

      This method seemed to work for me, but your mileage may vary depending on the content of your officeUI files.

      Let me know how you get on, or if you find a simpler method. Scripting the removal of the text above is probably going to be the hardest part with native Windows tools.

  4. I used the excel regedit example perfectly but there is one caveat. The MRU is brought into the users machines. I then cleared out my MRU and exported the new Reg key for Excel. Unfortunately everytime the users logon (I created a logon script via GP Preferences) their MRU is blank. How do I get their to begin rebuilding again?

  5. Even easier if you for example xcopy

    “\\server\share\OfficeUI\Normal.dotm” “C:\Documents and Settings\%username%\Application Data\Microsoft\Templates” /Y /I

    To:

    xcopy “\\server\share\OfficeUI\Normal.dotm” “%AppData%\Microsoft\Templates” /Y /I

Leave a Reply

Your email address will not be published.

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.