简体   繁体   English

Outlook加载项未在第二个实例上加载

[英]Outlook addin not loading on second instance

I have successfully created an addin for Outlook which shows/hides a custom task pane using a ribbon toggle button by following this link . 我已经为Outlook成功创建了一个插件,该插件通过点击此链接使用功能区切换按钮来显示/隐藏自定义任务窗格。

The problem I have is it works fine for one instance of Outlook, but as soon as I open another instance pressing the ribbon button only controls the addin on the first instance. 我遇到的问题是,它对于一个Outlook实例正常工作,但是一旦我打开另一个实例,按功能区按钮就只能控制第一个实例上的插件。

The ribbon code: 功能区代码:

    public partial class ManageTaskPaneRibbon
    {
    private void ManageTaskPaneRibbonLoad(object sender, RibbonUIEventArgs e)
    {
        btnToggle.Tag = Guid.NewGuid().ToString();
    }

    private void BtnToggleClick(object sender, RibbonControlEventArgs e)
    {
        Globals.ThisAddIn.TaskPane.Visible = ((RibbonToggleButton)sender).Checked;
    }
    }

I need the 2 instances to be completely separate in operation so they can work independently from each other. 我需要2个实例在操作上完全分开,以便它们可以彼此独立工作。

当Application.Explorers.NewExplorer事件触发时,为Explorer对象的实例创建一个新的任务窗格。

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

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