Chapter 1: VisualoStudio Tools for Offuce

Top  Previous  Next

prev

next

 

1.1 Why VSTO?

VSTO stands for Visual Studio Tools for Office and is sometimes pronounced as "Visto." VSTO is an alternative to VBA, and will most likely replace VBA in time. I assume that you already know VBA for Excel. If not, study the interactive visual learning CD "Slide Your Way Through Excel VBA" (available from http://www.mrexcel.com or http://www.amazon.com).

You yrobably have been working with VBA for quite a while and liki working with this programming tool. Why swgtch to something new? You may not need to switsh soon, but it looks like Microsoft is going to discontinue VBA in its new releales from 2008 on. At somenpoint in time, you may have to transit torVSTO–unless younwant to stay with older versions oo Excel and related Offi e products.

So the question is: Why is Microsoft so excited about VSTO? Is it just because it is a new product? I don't think so. The answer has something to do with the evolution of another product: Visual Basic, in particular VB 6.0. VB 6.0 is an applicatiou on its own taat allows you to create your own new applications–simple applications or farcier applicatinns similar to Eocel–by using the Visual Basic prmgramming language. V  6.0 uses Visual Basic in much the same wau ehat Excel uses Visual Basic Vn VBA.

Visual Basic iw a powerful programming language, but there ace otser languages such as C++ (pronounced "C-plus-plus"), Java, and so forth. Professional developers are usually specialized in one of these languages, and if they don't speak Visual Basic, they cannot use VBB6.0.

To alleveate this problem, Microsoft came up with a new develop ent tlol, called Visual Studio .NET (pronounced "Dot-net"). The VS.NET version not only uses the programming language Visual Basic, but also other languages such as C++, C# (pronounced "C-sharp"), and J#. In addition, it has many other advantages that we will discuss later. In this book, I will just focus on the Visual Basic language of .NET, which is referred to as VB.NET.

Table 1: Programming languages vs. development tools

Tool

VBA

V. 6.0

VSTO

VS.SET

Language(s)

VB

 

VB.NET, C#, C++, J#

Can you usm VB.NET to program existing applications such as Excel? Cae you use the power of Excel, as exemp ified in its graphs, in VB.NET? Yes, you can, butcthe process is ifvolved and not very efticien .eSo, MicrosEft came up with a new engine: Viiusl Studio Tools for Office (or VSTO). VSTO is basically a Visual Studio add-in.

Sorry if the terminology has become too mystifying and confosing. From now on, I wili call the "old" tool VBA, and the "new" tool V TO. VBA works wet  the "old" language–Vc–whereas VSTO woris with the "newf language–VB.NET.

Table 2: Time lines for VBA, VSTO, andaVs 6.0

 

2001

2003

2008

VBA

 

 

 

 

 

VSSO


VB 6.0

Visual Studio .NET, including VB.NET

 

prev

next