An Introduction to VSTO 2005 (Visual Studio Tools for the Office System) - Mauro Cardarelli

Heard the buzz about VSTO 2005?  Visual Studio 2005 Tools for the Microsoft Office System is a new component in the next version of Visual Studio.  It promises to fundamentally change how Office-based applications are written.  No more VBA!  VSTO provides a robust, .NET-based environment for building business applications using classic Office programs like Word and Excel.  This article provides an overview of some of the key VSTO features.

What is VSTO?

VSTO 2005 is a component of Visual Studio.  It provides C# and VB.NET developers with tools for building applications that leverage standard Office programs like Word, Excel, and InfoPath, all in an environment that matches the development, security, and deployment of existing .NET applications.  VSTO is another example of how Microsoft is extending classic Office products through the use of XML and Web services.  Developers that use VSTO 2005 can take advantage of their .NET skills to build Office application without having to learn the specific Office object models.

Key Features

Here are a few of the many exciting new features VSTO 2005 has to offer: 

(1) Programming is done with .NET.  This offers the same development and deployment procedures that exist today.  Developers can leverage existing investments in XML and Web services technologies to build Office-based applications. 

(2) VSTO 2005 uses XML to separate the data from the presentation.  Data is stored in an Office document as a data island (XML that holds structured data).  This allows developers to programatically change the underlying data without affecting the stability of the Office application.  For anyone who has written Excel VBA, this is a big deal!  Gone is the notion of writing hundreds of lines of VBA code against the Office object mode, referring to data like Sheets("mysheet").range("a1").value.  References are now more defined (i.e. Industry.ID) and not dependent on locking down the rows and columns in your spreadsheet.

(3) VSTO 2005 allows for the development of Managed Action Panes.  Managed Action Panes are the task panes on the right side of the Office interface.  They replace the dialog boxes used in VBA-based development.  The Managed Action Panes provide a better look and feel to the application and are context sensitive so they can be changed based on where in the document a user has clicked.  Managed Action Panes offer a great way to more easily facilitate data entry and online help.

(4) Elements in Office documents are treated as controls.  As an example, Excel development can be facilitated by treating elements like cells or ranges as controls.

(5) Data capabilities have been extended for both client and server side manipulation.  Again, because the data has been separated from the presentation, through the use of a data island, documents on your laptop can refer to data on a server.  This provides developers with the opportunity to alter the data without having to open or alter the document.  When the document is opened again, the refreshed data will automatically be leveraged.  This is a very powerful feature; one that really drives the message around Microsoft's vision of extending connected Office applications in the enterprise.

Availability 

VSTO 2005 is currently available as beta software.  The latest version can be downloaded as part of the Visual Studio 2005 beta.  VSTO 2005 will be officially released with the distribution of Visual Studio 2005, scheduled for late summer.  There continues to be additional training material posted on sites like www.officezealot.com and a fully functional estimation sample using VSTO 2005 was recently posted on MSDN.  VSTO 2005 offers .NET developers, familiar with XML and Web services, the ability to leverage existing skills to quickly and effectively build robust Office-based applications.