Unable to import exported toolbar in Office Outlook 2021

82 Views Asked by At

So I have made a custom toolbar button in Outlook 2021, and exported it completely fine.

But when I try to import it via VBA or manually, outlook doesn't seem to care about it.

In office 2016 toolbars worked completely differently and no issues there.

No error messages are shown at all.

Thats the vba code responsible for importing the UI.

Dim olApp As Object
Set olApp = Createobject("Outlook.Application")
Dim exportedUIPath As String
exportedUIPath "path\to\UI\0ffice2022.exportedUI"
olApp.Application.LoadCustomUI(exportedUIPath)
olApp-Application.SaveustomUI
Set olApp = Nothing
rem pause

The UI itself is built in that way

<mso:cmd app="olkexplorer" dt="0" slr="0" />
<mso:customUI xmlns:xl="http://schemas.microsoft.com/office/2009/07/customui/macro" xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui">
<mso:ribbon>
<mso:qat>
<mso:sharedControls>
<mso:control idQ-"mso:FilePrint" visible="false"/>
<mso:control idQ-"mso:FileSaveAs" visible-"false"/>
<mso:control idQ="mso:SendReceiveAll" visible="true"/>
<mso:control idQ="mso:UpdateFolder" visible="false"/>
<mso:control idQ="mso:Reply" visible="false"/>
<mso:control idQ="mso:ReplyAll" visible="false"/>
<mso:control idQ="mso:Forward" visible="false"/>
<mso:control idQ="mso:Delete" visible="false"/>
<mso:control idQ="mso:Undo" visible="true"/>
<mso:control idQ="mso:EmptyTrash" visible="false"/>
<mso:control idQ-"mso:PointerModeOptions" visible="false"/>
<mso:control idQ="mso:FindContactCombo" visible="false"/>
<mso:control idQ="mso:MinimizeRibbon" visible="false"/>
<mso:control idQ="mso:NavBack" visible="false"/>
<mso:control idQ="mso:NavForward" visible="false"/>
</mso:sharedControls>
</mso:qat>
<mso:tabs>

the rest of this build are my custom buttons, its too many to copy in here(The entire project is on another network on my workplace, its not easy to transfer code samples)

1

There are 1 best solutions below

1
LaNi On

So, apparently the issue was in the .exportedUI file all along. in the first line of the file snippet. Specifically I had to change the "slr" value from 0 to 1. since I changed that value, the VBScript code works perfectly fine.