简体   繁体   中英

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 .

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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