Share via


NETDA Presentation - VSTO

I attended the .NET Developers Association user group meeting last week in Redmond where Shoshanna Budzianowski, Group Program Manager in Visual Studio at Microsoft presented on Visual Studio Tools for Office (VSTO).  Shoshanna put on a fantastic presentation where I started thinking to myself, with Office 2003 and VSTO (especially with VSTO version 2.0) there will be a major shift to development with Office products.  The big thing today is Mobility.  The ability to get and enter data where ever you are in a connect or disconnected mode relates to significant productivity gains and competitive advantage.  Sure you can do this with a Win Forms application and you will for the complex applications, however, for many other applications Excel and Word could end up providing an efficient development platform.  Now take this with a grain of salt, I have not yet coded with VSTO and am not certain of what the disadvantages will be.

The 3 primary advantages:

1. .NET Code

 

You can now utilize the power of the .NET platform and Visual Studio to write code that runs in the process of Excel or Word.  This should result in a huge gain in developer productivity over using VBA.  Another interesting aspect is that the .NET code is compiled in a separate assembly from the Excel or Word documents.  This makes maintenance and deployment of the code much easier.  You just recompile the assembly with your changes and the next time the user opens Excel or Word the new assembly is loaded.  If you need to redeploy the Excel or Word document the user will still have to copy that document to there machine, however, you could add code to the assembly that will check if the user is using the correct document version.  If not, popup a window that will allow them to easily download it.

2. Xml Maps (Part of Office 2003)

Xml Maps are an amazing feature that allow you to map fields in the Excel document to an XML file.  Basically you add a XML Map through a XML Schema file or an XML file.  At this point, it reminds me of Info path where you have the ability to drag the fields onto the document.  From within Excel you can load the data from an XML document through the Data | XML | Import menu, make your changes, and then export the data back out to XML through Data | XML | Export.  Amazing.

What's even more amazing is you could use VSTO to automatically do this on open and on close of the document.  You could also get the data from a web service.  What ever you desire.  Watch out InfoPath!  I will provide a example of this in a future blog.

3. Security

The specifics of the security features are escaping me at this time, however, it was stressed that security was as good as .NET managed code and then some.  The way Shoshanna put it was that they learned a lot about security and viruses over the years from VBA and were putting all that knowledge into VSTO. For a lengthy discussion on VSTO Security check out this Office Development blog entry https://weblogs.asp.net/ptorr/archive/2003/11/03/56304.aspx

 

Related Links

 

https://msdn.microsoft.com/smartclient/vsto/default.aspx

https://msdn.microsoft.com/office/understanding/vsto/walkthroughs/default.aspx

https://blogs.msdn.com/vsto/rss.aspx

https://blogs.msdn.com/vsto2/rss.aspx