Migrating from VBA to .NET/VSTO – Where to Start
.NET and Office programmability has been around for a while now, but I suspect that many VBA developers are just beginning to evaluate .NET & Visual Studio Tools for Office (or VSTO). VSTO is a wizard that lives in Visual Studio that allows you to create projects around Word and Excel documents. In many ways, it is the VBA replacement for Word and Excel.
One criticism that I’ve heard, and totally understand is that VSTO doesn’t offer anything more than .NET programming on Office documents. While that statement is true, VBA and .NET are not equal citizens from a functionality standpoint. The .NET framework has a lot to offer in developing complex solutions, especially solutions that have to interact with XML and web services.
VSTO 2005, now in Beta 2 and due for release probably some time this year takes it to the next level. You will now be able to do things in VSTO that are absolutely impossible in VBA. For example, VSTO offers true databinding to ADO.NET and web services in both Word & Excel. VSTO offers TaskPane programmability. VSTO also offers a much better smart tag development model. VSTO provides a server programming model for manipulating the data in office documents. And even better yet, VSTO is basically a Visual Studio addin, which means you get all the great functionality of Visual Studio and you get away from the literally 8 year old VBA editor which offers minimal to no developer productivity tools.
The real challenge for the VBA developer coming to .NET is .NET itself. .NET is an extensive framework of class libraries and can be a bit daunting for the beginner. My advice to those considering or making the transition is to spend time learning about .NET before trying to figure out how to make .NET and Office work together. To help you get started, you might check out some of the free training provided by Microsoft at: http://lab.msdn.microsoft.com/express/beginner/default.aspx
This series is called “Absolute Beginner's Video Series to Visual Studio 2005 Express Editions”. Don’t let the name scare you away. Consider this as an introductory tutorial to get a broad idea about working inside Visual Studio and some of the features it offers.
Finally, you can learn more about VSTO in the OfficeZealot.com VSTO Zone at http://www.officezealot.com/vsto.