0

I need create a dockable window for my Visio 2010 add-in developed with VSTO, however I see no way of creating a task pane for Visio.

Am I missing something?

1
  • c# or vb.net ? which version of Office and Visual Studio? Mar 9, 2011 at 13:12

3 Answers 3

1

Unfortunately, neither Visio 2007 nor Visio 2010 supports Custom Task Panes.

http://msdn.microsoft.com/en-us/library/aa942846%28v=vs.80%29.aspx#Y649

0

You create dockable windows in Visio. These are "anchor" windows.

See this MSDN page: http://msdn.microsoft.com/en-us/library/ff767674.aspx

For example: some years ago I created an anchor window to simulate the Office ribbon UI which was not available in Visio 2007 at the time: http://blogs.msdn.com/b/saveenr/archive/2007/02/27/adding-a-ribbon-to-visio.aspx

-1

You can add a custom task pane to an application for Visio by following these steps:

  1. Open or create an application-level project for an application.
  2. On the Project menu, click Add User Control.
  3. In the Add New Item dialog box, change the name of the new user control to MyUserControl, and click Add.
  4. The user control opens in the designer.
  5. Drag one or more Windows Forms controls from the Toolbox to the user control.
  6. Open the ThisAddIn.cs or ThisAddIn.vb code file. (For C#) Private MyUserControl myUserControl1;
  7. Add the following code to the ThisAddIn class. This code declares an instance of MyUserControl as a member of ThisAddIn. (For C#) myUserControl1 = new MyUserControl(); Microsoft.Office.Tools.CustomTaskPane myCustomTaskPane = this.CustomTaskPanes.Add(myUserControl1, ""My Task Pane""); myCustomTaskPane.Visible = true;

Source: msdn.microsoft.com/en-us/library/aa942846%28v=vs.80%29.aspx#Y649

1
  • thank you for your answer. But it doesn't work, I get an arror saying ThisAddIn Error does not contain a definition for 'CustomTaskPanes' Mar 24, 2011 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.