outlook-addin - Outlook VSTO 插件/自定义功能区:如何在 Outlook 2016 中将自定义功能区添加到家庭组(主窗口)
问题描述
我尝试将以下自定义功能区(设计器方法)添加到 Outlook(资源管理器)中的 TabHomeGroup。不幸的是它不会出现。为什么?
我使用了这些 OfficeId:https ://www.microsoft.com/en-us/download/details.aspx?id=50745
namespace OutlookAddIn4
{
partial class Ribbon_Explorer : Microsoft.Office.Tools.Ribbon.RibbonBase
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
public Ribbon_Explorer()
: base(Globals.Factory.GetRibbonFactory())
{
InitializeComponent();
}
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">"true", wenn verwaltete Ressourcen gelöscht werden sollen, andernfalls "false".</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.tab1 = this.Factory.CreateRibbonTab();
this.group1 = this.Factory.CreateRibbonGroup();
this.btnSettings = this.Factory.CreateRibbonButton();
this.tab1.SuspendLayout();
this.group1.SuspendLayout();
this.SuspendLayout();
//
// tab1
//
this.tab1.ControlId.ControlIdType = Microsoft.Office.Tools.Ribbon.RibbonControlIdType.Office;
this.tab1.ControlId.OfficeId = "TabHomeGroup";
this.tab1.Groups.Add(this.group1);
this.tab1.Label = "TabHomeGroup";
this.tab1.Name = "tab1";
//
// group1
//
this.group1.Items.Add(this.btnSettings);
this.group1.Label = "group1";
this.group1.Name = "group1";
//
// btnSettings
//
this.btnSettings.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
this.btnSettings.Image = global::OutlookAddIn4.Properties.Resources.do_48x48;
this.btnSettings.Label = "Settings";
this.btnSettings.Name = "btnSettings";
this.btnSettings.ShowImage = true;
this.btnSettings.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnSettings_Click);
//
// Ribbon_Explorer
//
this.Name = "Ribbon_Explorer";
this.RibbonType = "Microsoft.Outlook.Explorer";
this.Tabs.Add(this.tab1);
this.Load += new Microsoft.Office.Tools.Ribbon.RibbonUIEventHandler(this.Ribbon_Explorer_Load);
this.tab1.ResumeLayout(false);
this.tab1.PerformLayout();
this.group1.ResumeLayout(false);
this.group1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
internal Microsoft.Office.Tools.Ribbon.RibbonTab tab1;
internal Microsoft.Office.Tools.Ribbon.RibbonGroup group1;
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnSettings;
internal SettingsForm settingsForm;
}
partial class ThisRibbonCollection
{
internal Ribbon_Explorer Ribbon_Explorer
{
get { return this.GetRibbon<Ribbon_Explorer>(); }
}
}
}
解决方案
您确定在TabHomeGroup
您的加载项启动时可见吗?
TabHome
无论如何,如果要将自定义 UI 放置Home
在资源管理器窗口的选项卡上,则需要使用idMso。
推荐阅读
- c++ - 如何在 Visual Studio 中处理大量文件夹,每个文件夹都有自己的 Makefile
- javascript - 点击按钮/网址上的 Javascript 警报 DIV 内容
- python - 来自 Gan 的负载生成器模型
- c++ - 如何在计算特征值/特征向量时减少重复代码?
- python - 提供分类类型时,DMatrix 参数“enable_categorical”必须设置为“True” - XGB 具有 Shap 值特征重要性
- java - 插件 org.jooq.pro:jooq-codegen-maven 或其依赖项之一无法解析
- hazelcast - 使用 Hazelcast 和 Hazelcast Jet 的数据结构问题
- postgresql - 使用 pgadmin 备份/恢复单个 postgresql 表
- java - 使用 fabric8 openshift-client 检索 openshift 资源列表
- docker - 无法更改 docker 容器内的默认 python 版本