Skip to content

Commit 5ae6ef6

Browse files
committed
Avoid custom UI error
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".
1 parent df8f536 commit 5ae6ef6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Ribbon.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ public string Ribbon_LoadLabel(Office.IRibbonControl Control)
4343
#region IRibbonExtensibility のメンバー
4444

4545
public string GetCustomUI(string ribbonID)
46-
{
47-
return GetResourceText("FlexConfirmMail.Ribbon.xml");
46+
{
47+
if (ribbonID == "Microsoft.Outlook.Explorer")
48+
{
49+
return GetResourceText("FlexConfirmMail.Ribbon.xml");
50+
}
51+
return "";
4852
}
4953

5054
#endregion

0 commit comments

Comments
 (0)