Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6119933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:36:37+00:00 2026-05-23T15:36:37+00:00

I have an excel 2007 Add-in built with VS2010 VSTO library. when i create

  • 0

I have an excel 2007 Add-in built with VS2010 VSTO library.
when i create a new object of the add-in, i also create an excel left task pane, using the following code:

Microsoft.Office.Tools.CustomTaskPane taskPaneAddIn;
MyAddIn addIn;

addIn = new MyAddIn(this.Application);
taskPaneAddIn = this.CustomTaskPanes.Add(addIn, "My AddIn");
taskPaneAddIn.DockPosition = Microsoft.Office.Core.MsoCTPDockPosition.msoCTPDockPositionLeft;
taskPaneAddIn.Width = addIn.Size.Width + 5;

The addIn is a windows user control which has its own dimensions.

The code above seems not to work as the taskPaneAddIn width is always fixed on the excel. the user always has to manually expand the task pane to see the entire width of the control.

Is there any programmable way to set the task pane width?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:36:37+00:00Added an answer on May 23, 2026 at 3:36 pm

    I think the source of your problem is that when you add the control to the CustomTaskPanes, its Width gets set to zero (I think it has to do with the fact that the control gets docked). To address your problem, you can do the following, and retrieve the width of your control before it is added:

    var control = new TaskPaneControl();
    var width = control.Width;
    var taskPane = CustomTaskPanes.Add(control, "Wide");
    taskPane.Width = width;
    taskPane.Visible = true;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a few Excel 2003/2007 add-ins using VSTO, and I usually end
I have an VSTO excel 2007 Add in. For this I have created a
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
We have existing VS 2008 VSTO add-ins for Word 2003 and Excel 2003. We
I built an Excel add-in with VSTO 2005 SE, which I deployed to a
I am currently building an Excel 2007 Add-in using VSTO (latest version + sp1)
I have built an Excel document using the PHPExcel Library. My document opens and
Background: I'm using MEF to help compose an Excel 2007 Add-In (VSTO) that can
I have a problem connected with Office 2007 and VSTO add-in. Description: Windows XP
I have an Excel 2007 ODBC connection defined and I need to allow users

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.