向 Outlook 2010 功能区添加选项卡?

发布于 2024-08-13 18:23:04 字数 280 浏览 3 评论 0原文

我正在尝试创建一个 Outlook 2010 插件,将新选项卡添加到功能区。我发现如何通过将 OfficeId 设置为“TabMail”或内置内容来将我的组添加到现有选项卡,但我不想修改现有选项卡。

我现在已将 OfficeId 设置为我自己的内容(“TabMyAddin”),但它没有显示在 Outlook 中。我想知道是否需要以某种方式告诉 Outlook 添加并显示它,或者我将如何继续?

如果重要的话,RibbonType 已更改为 Microsoft.Outlook.Explorer。

I'm trying to create an Outlook 2010 addin that adds a new tab to the ribbon. I found out how I can add my groups to an existing tab by setting the OfficeId to "TabMail" or something built-in, but I don't want to modify existing tabs.

I've now set the OfficeId that something of my own ("TabMyAddin"), but it doesn't show up in Outlook. I wonder if I need to somehow tell Outlook to add it and show it, or how I would proceed?

The RibbonType was changed to Microsoft.Outlook.Explorer if that matters.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

柠北森屋 2024-08-20 18:23:04

好的,明白了:

  • 在 Visual Ribbon Designer 中,ControlId 属性需要设置为“自定义”而不是 Office。当设置为 Office 时,它​​将 idMso 设置为给定的 OfficeId,当设置为 Custom 时,它将设置 id。
  • 在 XML 功能区设计器中, 需要有一个 id 而不是 idMso。

Okay, got it:

  • In the Visual Ribbon Designer, the ControlId property needs to be set to "Custom" instead of Office. When set to Office, it will set idMso to the given OfficeId and when set to Custom, it will instead set the id.
  • In the XML Ribbon Designer, the <tab> needs to have an id instead of an idMso.
北音执念 2024-08-20 18:23:04

我可以让它工作的唯一方法是将 ControlID 设置为自定义并将 RibbonType 更改为 Microsoft.Outlook.Explorer

The only way that I can get it to work is by setting the ControlID to custom and changing the RibbonType to Microsoft.Outlook.Explorer.

相守太难 2024-08-20 18:23:04

您可以在 Outlook 中添加选项卡,只需使用以下步骤:

1) 转到项目并单击添加项目。

2) 您将看到以下屏幕在此处输入图像描述

3) 将以下代码粘贴到 thisAddin.cs 文件中

 protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()

 {
  return new Ribbon1();
 }

4) 打开 Ribbon1.xml 文件。您将看到功能区选项卡控制代码。您可以在功能区节点下的 xml 中更改选项卡名称、组名称

<tabs>
  <tab idMso="TabAddIns" label="tab name">  // your tab name
    <group id="MyGroup"
           label="My Group">
    </group>
  </tab>
</tabs>

you can add tab in outlook, just using following steps :

1) Go to project and click on add item.

2) you will see following screenenter image description here

3) paste following code in thisAddin.cs file

 protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()

 {
  return new Ribbon1();
 }

4) Open the Ribbon1.xml file . You will see ribbon tab control code. you can change tab name , group name in xml under ribbon node

<tabs>
  <tab idMso="TabAddIns" label="tab name">  // your tab name
    <group id="MyGroup"
           label="My Group">
    </group>
  </tab>
</tabs>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文