Combining Multiple Office Tool Bars (olkexplorer.officeUI)

Hi! Today we are going to have a post on a more specific and technical topic. I recently found a need to combine a customized Microsoft Office 2016 Outlook tool bar with the user’s existing tool bar – also know as olkexplorer.officeUI. The easy route would be to just force the end user to use the customized bar and loose their existing changes. However, we want to provide the highest level of customer service so we need to keep our end users happy! I spent significant time looking at other forum postings and found no one really covered this topic – hence, I hope this post saves someone a few hours worth of time (or more)!

CAUTION! It is recommended that you have a good understanding of PowerShell and XML prior to working with this code. If you have any questions – please visit the contact section or level a note in the comments.

Now for the fun stuff!

$path_to_office = “$env:USERPROFILE\AppData\Local\Microsoft\Office”

if (-NOT (Test-Path “$path_to_office\olkexplorer.officeUI”))
Copy-Item “\\NETWORKSHARE\generic_olkexplorer.officeUI” “$path_to_office\olkexplorer.officeUI”

Copy-Item “$path_to_office\olkexplorer.officeUI” “$path_to_office\olkexplorer.officeUI.BAK”

Remove-Item “$path_to_office\olkexplorer.officeUI”

$input = [xml](Get-Content -Path “$path_to_office\olkexplorer.officeUI.BAK”)
$output =[xml](Get-Content “\\NETWORKSHARE\customtoolbar.officeUI”)

Foreach ($Node in $
$output.customUI.ribbon.tabs.AppendChild($output.ImportNode($Node, $true))


Great, thanks for visiting, enjoy! Just kidding – let me give you a quick run down of what is going on above.

First, we need to set a variable to the install location of Microsoft Office on the end users computer where we can find olkexplorer.officeUI.

Next, if the user does NOT have a customized toolbar – let’s copy a generic olkexplorer.officeUI from a network share to the local machine. We need to have a generic one to combine our customized toolbar into.

Next, since we are good system administrators – we need a way to get ourselves out of trouble. Therefor, let’s copy the users existing toolbar for backup and then delete the source.

Finally, the last part is our secret sauce – the fun stuff! We take the users Office toolbar and combine it with our custom Office toolbar using PowerShell’s wonderful built in XML interpreter and save the output.


Leave a Reply

Your email address will not be published. Required fields are marked *