Hiding Task Pane programmatically with VSTO

Today I struggled for some time to figure out how to control the visibility of custom task pane in Excel 2007. I had done quite a few Word 2007 addin projects but this is the first time I try to do it in Excel.

In Word 2007 with VSTO 3.0 (that comes with VS2008) to hiding the custom task pane I would add this in the Click event code

Me.Application.TaskPanes(Word.WdTaskPanes.wdTaskPaneDocumentActions).Visible = False

But with Excel 2007 it is different. You have use the DisplayDocumentActionTaskPane class

Me.Application.DisplayDocumentActionTaskPane = False

I found the solution in the MSDN article here.

Just FYI, adding a action pane is same for both application using the following method

Me.ActionsPane.Controls.Add(actions)

Your ERP, CRM and LOB should look like this!

Just came back from Krabi today and the first thing that caught my eye when I open up Live.com homepage for the 1st time since 5 days is a sample ERP applications that make practical use of Windows Presentation Foundation framework without just snapping just another colossal.

lawson_1
The Lawson M3 Smart Client

Look at it, it is a familar interface like our normal Windows Form app but it gives end users a fresh feel which I think they will be happy to open and use everyday. And if you want to integrate this into Office task panes as a WPF add in, you can do so easily with VSTO 2008 as I mentioned here.

By the way, should you try to get away by saying there is no ‘design’ guy in your team/ company, a company called reuxables is making one of their WPF theme available free in the form of a .dll file. Download it here.

Me on video about VS2008 – Part 1a VB9

The team got me to help them do a series of video recordings focusing on Visual Studio 2008 new features. Among them are VB 9.0 and VSTO 3.0. The first video just came out some time ago, and kid you not, I am more nervous doing recording and giving talk in a hall. So check out my attempt to embarrass myself here, but I welcome all feedback to improve myself. I shared about a new feature in VB9.0 called Friend Assemblies.

http://blogs.msdn.com/malaysia/archive/2008/01/11/visual-studio-2008-vb-9-0-friend-assemblies.aspx

To watch out for in near future, you will see my videos about another 2 of my favorite VB 9.0 features.

  1. In Language XML Support
  2. If Operator

Also after Chinese New Year will plan on recordings of VSTO3.0

  1. Integrating .NET 3.5 into Office
  2. RAD programming with Office 2007 Ribbon UI
  3. SharePoint workflow – From 15 steps to 5

Create your custom rules for VSTS Code Analysis

There was a gentlemen among the audience at TechNet MSDN Roadshow Penang asked me about adding your own rules into Code Analysis. Well who doesn’t want to once they realize the potential of VSTS together with Check in policy in Team Foundation Server. So I did a search on the web and found the below 2 tutorials.

Tim McCarthy’s Blog

Soledad Pano’s Blog

The tutorials are written for VSTS 2005 but it will work as well for VSTS 2008. By the way there is a site within MSDN showing you how to extend Visual Studio’s functionality.

http://msdn2.microsoft.com/en-us/vstudio/aa700820.aspx

New SharePoint development tool @Codeplex

Ted Pattison came out with a new tool known as STSDEV which facilitates SharePoint developers to create projects within the Visual Studio environment.

  1. Creates VS solution and project structure
  2. facilitates building, testing and debugging of .WSP files.
  3. Automates creation and updating of manifest.xml and .ddf file
  4. Adds common SharePoint developer commands into VS

You can download the tutorial videos or the project here. http://www.codeplex.com/stsdev/