VSTO Outlook Add-In Ribbon not showing in Outlook 2007

只谈情不闲聊 提交于 2019-12-11 13:45:01

问题


I have an Outlook add-in developed using VSTO Outlook 2010 template which has a ribbon. The ribbon xml is

<?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>

This ribbon shows and functions properly in Outlook 2016. However, the ribbon does not show in Outlook 2007. Is this a compatibility issue? How can I modify this xml to support Outlook 2007 as well?

Other than the UI, the functionality of the Add-In is working in both Outlook 2016 and Outlook 2007. I'm using Visual Studio 2015 to develop this.


回答1:


You must first install the Outlook 2007 Primary Interop Assembly (PIA) in the Global Assembly Cache (GAC) before you can incorporate information from the PIA in an Outlook managed add-in. You can do so by choosing the Typical installation of Office and then adding .NET Programmability Support for Outlook.

To add .NET Programmability Support for Outlook after Outlook is installed In Control Panel, click Add or Remove Programs.

Select your installation of Office and click Change.

Select Add or Remove Features.

Click Continue.

In the Installation Options tab, click the '+' to expand the application for which you want to install the PIA.

Click the drop-down arrow adjacent to .NET Programmability Support and select Run from My Computer.



来源:https://stackoverflow.com/questions/47448477/vsto-outlook-add-in-ribbon-not-showing-in-outlook-2007

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!