Use PowerShell to change your Office ProPlus theme

Use PowerShell to change your Office ProPlus theme header image

I love my dark theme in Windows. It might be a bit geeky but I do love it. So when I saw a Twitter thread on Lumos I had to play around with it. Lumos allows you to use PowerShell to switch between the Windows 10 themes. It also allows you to set a schedule. This lets Windows figure out the theme based on the local sunset and sunrise.

Presenting mode

While the dark mode is awesome, it is not something I like for presenting. Most beamers or screens are not handling the darker modes very well. And when there is some sunlight involved a white background provides more contrasts. Hence I usually switch back everything to the light theme. Switching back for Windows was made easy by Lumos, but I also use Office. So it made sense to try and set the Office theme using PowerShell as well.

Office installation

There are quite a few blog posts out there with details on setting your Office theme. Yet none of them seem to work or are not providing details that worked for me. So I ended up playing around a bit with the required settings. Finally figuring out the combination that works for Office ProPlus.

To set the theme you can use the registry as Lumos is using for Windows. However, for your Office installation, there are two settings you have to set:

HKCU:\Software\Microsoft\Office\16.0\Common\UI Theme

The first one is pretty obvious. It contains the theme value for your selected theme. The second one is a bit more complex. It also contains the theme value. However, the location is dependant on the account you use to login. So each installation or Office ProPlus activation can generate a new GUID. Making it a bit harder to set.

When setting those values you can use the following values:

  • 0 for Colorfull
  • 3 for Dark Gray
  • 4 for Black
  • 5 for White

The first registry value has to be a DWORD, the second has to be Binary. When using PowerShell you can easily set those values. By retrieving all identities that are present in the registry you can easily set those values. Setting your Office ProPlus to ‘black’ can be done using the following script.

$proPlusThemeValue = 4;
$OfficeThemeRegKey = 'HKCU:\Software\Microsoft\Office\16.0\Common'

Set-ItemProperty -Path $OfficeThemeRegKey -Name 'UI Theme' -Value $proPlusThemeValue -Type DWORD

# Set your identity
Get-ChildItem -Path ($OfficeThemeRegKey + "\Roaming\Identities\") | ForEach-Object {
  $identityPath = ($_.Name.Replace('HKEY_CURRENT_USER', 'HKCU:') + "\Settings\1186\{00000000-0000-0000-0000-000000000000}");

  if (Get-ItemProperty -Path $identityPath -Name 'Data' -ErrorAction Ignore) {
    Write-Verbose $identityPath

    Set-ItemProperty -Path $identityPath -Name 'Data' -Value ([byte[]]($proPlusThemeValue, 0, 0, 0)) -Type Binary

Once set you do have to restart Office. I did not found a way to make it reflect changes instant. If you know how to achieve that, let me know!

Loading comments…