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
I had the same problem, but it was not any addin I could disable (COM+ or Excel).
I had my excel configured to open files at startup (Excel Options -> Advanced -> General)
There, I had an .XLAM that customized the ribbon. When I cleared this configuration, my addin started working.
Create a new instance of the task pane for each workbook. Make the following changes to your code and the task pane works even with addins enabled.