Patrick’s Bytes

Techie for the past 30 years…

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.

Deployment Options in VSTO v3.0 (VS2008)

There is a few new options to deploy an Office addin in Visual Studio Tools for Office 3.0. Among them are creation of a setup.exe file, or via click once.

Here I how to create a .msi deployment file so that it can be built on a CD.

1. Right click on the project file and select Publish

image

2. Then you will see a wizard pops up, for this I enter a file path

image

3. Next I select CD-ROM as installation path to end users

image

4. On the next path, I click Finish

image

Now wait for the building process to be done, and you can open the deployment folder. For developers coming from previous VSTO they are understand how easy is it now to create deployment files for their VSTO projects.

image

Now when I click on setup.exe, the VSTO installation wizard will pops up

image

When I click Install, it will auto install itself without asking further question, huge improvement for end users and IT admin alike!

image

Microsoft Visual Studio 2008 Beta 2 is here

Beta 2 of Orcas just got release today and is downloadable either in VPC form or a DVD image. If you are based in South East Asia, where else to learn from experts about Orcas except TechEd 2007 South East Asia. There is the good old developer track and the newer web development track and their sessions have a lot of  materials on Orcas.

Web Development and UX Track
Getting Started Building Rich Interactive Apps with Silverlight
Deep Dive into Silverlight 1.1. with .NET

Developer Technology Track
Windows Client .NET: Building Rick Client UI with Acropolis Framework
Workflow in real world & how MS leverages workflow technologies
What’s new for device developers in Orcas
A lap around VS Orcas
LINQ and XML Integration in VB Orcas

You can have a look at the full list here.

Blog about VSTO in Orcas

Eric Carter been blogging about new VSTO features inside Visual Studio 2008 (Orcas), among them are

  • New Document Level Office Project Type
  • Sharepoint Workflow Project Type
  • Mixing VBA and VSTO .NET managed code
  • And there are many post about OBA and mashups as well.
« Newer PostsOlder Posts »