Skip to content

Commit

Permalink
Avoid custom UI error
Browse files Browse the repository at this point in the history
The "TabMail" tab exists only in the ribbon whose id is "Microsoft.Outlook.Explorer". So if we open a ribbon
whose id is not "Microsoft.Outlook.Explorer", we may get a custom UI error like "TabMail" doesn't exist.
The error is displayed when Outlook's setting "Options" -> "Advanced" -> "Show add-in user interface errors"
is enabled.

This patch avoid that error by creating custom UI only when ribbonID is "Microsoft.Outlook.Explorer".
  • Loading branch information
HashidaTKS committed Dec 18, 2024
1 parent df8f536 commit 5ae6ef6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Ribbon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ public string Ribbon_LoadLabel(Office.IRibbonControl Control)
#region IRibbonExtensibility のメンバー

public string GetCustomUI(string ribbonID)
{
return GetResourceText("FlexConfirmMail.Ribbon.xml");
{
if (ribbonID == "Microsoft.Outlook.Explorer")
{
return GetResourceText("FlexConfirmMail.Ribbon.xml");
}
return "";
}

#endregion
Expand Down

0 comments on commit 5ae6ef6

Please sign in to comment.