0

I am creating an add-in for Visual Studio 2012. I want to create a custom task pane that I could fill with files and folders that could be selected and opened by a developer. I have found a lot of documentation on how to create add-ins with task panes for MS Office, but I can't find anything about how to add a task pane to Visual Studio with an add-in.

Thanks.

janovak
  • 1,531
  • 2
  • 12
  • 22

1 Answers1

0

If you have the professional version of 2012 you can use the following link.

http://msdn.microsoft.com/en-us/library/aa942846(v=vs.110).aspx

Essentially you will need to add a User Control (this becomes your custom task pane)

If you are using express edition of Visual Studio it would be ideal to download and use NetOffice - http://netoffice.codeplex.com/

The following is an example of the code I have used in my project. I have added a user control called UserControl1. This is using the Ultimate version however it is the same for at least the professional version.

Private myUserControl1 As UserControl1
Private myCustomTaskPane As Microsoft.Office.Tools.CustomTaskPane

Private Sub ThisAddIn_Startup() Handles Me.Startup

    myUserControl1 = New UserControl1
    myCustomTaskPane = Me.CustomTaskPanes.Add(myUserControl1, "Picture Table Editor Pane")

    With myCustomTaskPane
        .DockPosition = Microsoft.Office.Core.MsoCTPDockPosition.msoCTPDockPositionFloating
        .Width = 300
        .Height = 400
        .DockPosition = Microsoft.Office.Core.MsoCTPDockPosition.msoCTPDockPositionLeft
        .Width = 300
    End With

End Sub
tfitzhardinge
  • 43
  • 1
  • 2
  • 8