VSTO Outlook加载项功能区未在Outlook 2007中显示

时间:2017-11-23 05:53:13

标签: c# visual-studio-2015 outlook vsto

我有一个使用带有功能区的VSTO Outlook 2010模板开发的Outlook加载项。功能区xml是

<?xml version="1.0" encoding="UTF-8"?>
<customUI onLoad="Ribbon_Load" xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    <ribbon>
        <tabs>
            <tab idMso="TabAddIns">
                <group id="PluginGroup" label="the Collective">
                    <button id="FolderSelector" onAction="FolderSelector_Click" screentip="Click to select forwarding folder" label="Folder Selector" showImage="false" />
                    <labelControl id="label1" label="Current Folder :" screentip="Folder which all email will be forwarded" />
                    <labelControl id="guiCurrrentChooserFolder" label="Please Select a folder" />
                </group>
            </tab>
        </tabs>
    </ribbon>
</customUI>

此功能区在Outlook 2016中正常显示和运行。但是,功能区未在Outlook 2007中显示。这是兼容性问题吗?如何修改此xml以支持Outlook 2007?

除了UI之外,加载项的功能在Outlook 2016和Outlook 2007中都有效。我正在使用Visual Studio 2015来开发它。

1 个答案:

答案 0 :(得分:1)

必须首先在全局程序集缓存(GAC)中安装Outlook 2007 Primary Interop Assembly (PIA),然后才能在Outlook托管加载项中合并PIA中的信息。您可以选择Office的典型安装,然后为Outlook添加.NET可编程性支持。

在安装Outlook后为Outlook添加.NET可编程性支持 在“控制面板”中,单击“添加或删除程序”。

选择Office安装,然后单击“更改”。

选择添加或删除功能。

点击继续。

在“安装选项”选项卡中,单击“+”以展开要为其安装PIA的应用程序。

单击.NET Programmability Support旁边的下拉箭头,然后选择“从我的电脑运行”。