简体   繁体   English

TabAppointment选项卡中的Outlook 2010 AddIn

[英]Outlook 2010 AddIn in the TabAppointment Tab

I tried to add my Outlook 2010 Add-In to the TabAppointment Tab. 我尝试将我的Outlook 2010加载项添加到TabAppointment选项卡。 It perfectly works when I add it to the TabCalendar, but if you click on a appointment in the calendar another tab will be shown and this tab I guess is the TabAppointment. 当我将它添加到TabCalendar时它完全有效,但如果你点击日历中的约会,将显示另一个选项卡,我猜这个选项卡是TabAppointment。 And of course my Add-In should be there. 当然,我的插件应该在那里。 The user should not have to change the tab first to use it. 用户不必首先更改选项卡以使用它。

在此输入图像描述 The list of OfficeId for the controls/tabs. 控件/选项卡的OfficeId列表。 List can be downloaded here . 列表可以在这里下载

在此输入图像描述 The tab the Add-In finally should be placed 应该放置加载项的选项卡

My Add-In should be visible every time a calendar item is selected. 每次选择日历项时,我的加载项都应该可见。 So as I wrote, the TabCalendar work, but then it's placed in the Start Tab. 因此,正如我所写,TabCalendar工作,但随后它被放置在开始选项卡中。

Anyone an idea why my button group is not visible there when I choose TabAppointment? 当我选择TabAppointment时,有人知道为什么我的按钮组在那里不可见? Is it the wrong tab? 这是错误的标签吗? Or is it just not possible to add Add-Ins at this place? 或者是否无法在此处添加加载项?

You are indeed using the wrong Tab, or more precisely, you're not using the correct ContextualTab 您确实使用了错误的Tab,或者更确切地说,您没有使用正确的ContextualTab

Adding an addin to a contextualTab is not possible as far as I know. 据我所知,在contextualTab中添加插件是不可能的。

What I can suggest you is converting your current ribbon (designer) into a Ribbon UI xml, wire the XML and the Ribbon class correctly to your existing code. 我建议你将当前的功能区(设计器)转换为Ribbon UI xml,将XML和Ribbon类正确连接到现有代码。

<customUI onLoad="Ribbon_Load" xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    <ribbon>
        <contextualTabs>
          <tabSet idMso="TabSetAppointment">
            <tab idMso="TabAppointment">
              <group id="group1" label="Normal Meeting Group" />
            </tab>
          </tabSet>
          <tabSet idMso="TabSetReccurringAppointment">
            <tab idMso="TabRecurringAppointment">
              <group id="group2" label="Recurring Meeting Group" />
            </tab>
          </tabSet>
        </contextualTabs>
    </ribbon>
</customUI>

This will make your group/controls appear in the wanted (contextual)Tab. 这将使您的组/控件显示在所需(上下文)选项卡中。 在此输入图像描述

PS : don't forget to enable the Ribbon XML item by overiding the CreateRibbonExtensibilityObject() method, and create the callbacks (aka event handler from your designer) PS:不要忘记通过覆盖CreateRibbonExtensibilityObject()方法启用Ribbon XML项,并创建回调(也就是设计器中的事件处理程序)

Hope that helped:) 希望有帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM