Search code examples
excelvstoexcel-2013excel-addinscustomtaskpane

Excel Custom Task Pane not showing


I'm showing a custom task pane in an excel VSTO add-in, I'm building it and showing it as thus:

var ctrl = new CellTaskPane();
var pane = CustomTaskPanes.Add(ctrl, "Custom Sheet");
pane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionRight;
pane.DockPositionRestrict = Office.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange;
pane.Visible = true;

This is being done in the ThisAddin.cs file and it working just fine on my machine, both under a Debug session and with the add-in installed via the click-once installer.

However, installing the add-in on a colleague's machine is proving troublesome.

The add-in is functioning and the context menu / ribbon is working perfectly, but the pane just refuses to show.

I have a toggle button on the ribbon which toggles the Visible property on the pane and even clicking that isn't forcing the pane to show.

Any help on this would be greatly appreciated, Google is proving useless for this.

Thanks.


I should mention that CellTaskPane is just a UserControl as per the docs on MSDN: http://msdn.microsoft.com/en-us/library/aa942846.aspx


Solution

  • Turns out it wasn't anything we were doing directly!

    There was another add-in installed (third party) which for some bizarre reason was interfering with the pane being shown (no idea why or how).

    Shame that Excel doesn't show any sort of error or at least throw an exception.

    Ah well.