Origin URL: The http://craigbailey.net/live/post/2008/08/03/CLARITY-Visual-Studio-Tools-for-Office-(vsto). aspx
After chatting with a few people aboutVisual Studio Tools for office(Vsto) recently, it's clear that the technology is not that well understood (even though, in my opinion, microsoft have done a pretty good job of articulating it-much better than say Oba for example ). so in this post I'm aiming to give a high level overview of vsto and clear up some misconceptions.
As usual this is covered under my 'well duh' disclause, and I apologise in advance for 'reworking' some of my content from earlier in the year, including this one from January and my general vsto page. for a comparison of vsto to vsta see this page.
Vsto-what?
Vsto is Microsoft's tool set for building applications that runOnMicrosoft Office (eg Word, Excel, outlook, PowerPoint ).
I deliberately choose the word'On'Because part of understanding vsto is to viewOffice as a platform.
Vsto-A Brief History...
Originally a replacement for VBA (Visual Basic for Applications) that was delivered in Excel and Word, vsto was made available in itsFirst versionApproximately around the start of 2004, targeting the Office 2003 platform. development was shortmed in Visual Studio 2003 but was referred to as vsto 2003 (or sometimes vsto 1.0 ). it was an add-on to. NET 2003 and wasn' t free (costing around $450 ).
TheSecond Version, Referred to as V2 or vsto 2005 was a big update that added numerous advances and enhancements (eg support for outlook ). it was delivered as a special SKU of VS 2005 (my understanding is it was not available as a separate download, But I cocould be wrong ).
TheThird version, Confusingly titled vsto 2005 Second Edition (vsto 2005 SE) was delivered in 2007 and focused on targeting the Office 2007 platform. It was a freely downloadable add-on for VS 2005.
This se version was tweaked significantly and released in November 2007 as partVisual Studio 2008(Professional and above-it is not available in the Standard Edition), and is referred to as vsto V3 (even though it isFourth versionOf the product ). vsto 2008 overcomes versions of the deployment and security hurdles found in previous versions, and adds a number of design helpers (eg visual editing of Office 2007 toolbars, support for Sharepoint 3.0 workflow, etc ). SP1 for vsto V3 is to be released shortly and further improves deployment abilities (as well as bug fixes, enhancement, etc ).
[The reason the version numbers are confusing is because in Vx terms they refer to the runtime used, not so much the tooling released. so, technically speaking vsto 2005 and vsto 2005 se both use the same V2 runtime. vsto in Visual Studio 2008 is using V3 of the runtime, even though it is the fourth release of the product. for more information Andrew Whitechapel has a excellent overview.]
The aim of vsto isProvide tools for developers Build on top of office as a platform. Using VB. net and/or C #, developers can use Visual Studio to build add-ins for most of the Office 2003 and 2007 applications, including Word, Excel, outlook, PowerPoint, infopath and Visio. sharePoint and groove development is also possible, although not directly targeted.
Vsto-how?
So, how to get working with vsto?
In a nutshellVsto is a set of Visual Studio project templatesThat allow you to write add-ins for Microsoft Office applications (eg an add-in for outlook, or word, etc ).
(Don't worry) I'm not going into any code in this post, but I think screen shot from file-> New-> project... In Visual Studio 2008 helps explain the scope:
As a developer you can build add-ins for most of the office programs. start by choosing a particle template (eg an outlook 2007 add-in) and Visual Studio will setup the skeleton and initial hooks.
Application level versus document level
Vsto supports four types of add-in. The two main ones are:
- Application level add-ins-Are those that reside in the program itself. example: you add a toolbar in word that has functionality that can run regardless of which document you have open. application level add-ins can be written for just about all office apps including Outlook, Word, Excel, PowerPoint, project and Visio (all in both 2003 and 2007 versions) and infopath 2007.
- Document LevelAdd-ins (orCustomisations)-Are delivered within a specific document. example: You include functions in a specific Excel Workbook. the functions are only available when you open that workbook. document level add-ins are only relevant to Word and Excel. (You coshould think of document level customisations as the vsto equivalent of VBA Macros in Word and Excel ).
Vsto also support two lesser known types:
- SharePoint 2007 workflow templates
- Infopath 2007 form templates
Vsto-some misconceptions
There's a few common misconceptions I 've come into SS talking with people about vsto. Here'sClarifications:
- Yes,Vsto V3 requires Visual Studio 2008 and the. NET Framework 3.5-I mention this because it is a common question on the forums. so, if you don't have Visual Studio 2008, or can't be certain your users will have. net 3.5 then you'll need to work with a previous version.
- Yes, you canTarget both Office 2003 and Office 2007Apps using vsto V3, but no, you can't target them both in the same add-in (eg you can't write a single add-in that will work in both Outlook 2003 and Outlook 2007 ).
- Yes,Vsto and VBA are friends. Whilst vsto may have started out as a replacement for VBA, it soon became apparent that InterOP with VBA is much better for all concerned. VBA is going to be around for a while, and with InterOP the huge body of VBA code can be used in vsto apps (see this post for more VBA and vsto details ).
- Yes,Vsto is a part of Oba-You may run into the term office business applications (Oba) and think Oba and vsto are synonymous. but that 'd be missing the huge scope of Oba. oba covers a whole enterprise architecture with lob apps and servers as well as office. vsto is just part of the tooling for building obas (see here For a full overview of Oba ).
Vsto-why?
Question: Why exactly wocould you want to consider vsto?
Answer: So you can build on a platform.
And not just any platform. But a platform that is now in its twelfth version, covers almost every imaginable business and home user scenario, and is installed on more 500 m PCs worldwide... The Office platform.
Now, to be fair, not all of those users are using Visual Studio 2003 or 2007, but the majority certainly are, and growing. (for example, in a recent Oba webcast I watched, around und the mark there were figures from Forester research-dated 31 Mar 2008-detailing that 62% of surveyed specified ISES not yet on Office 2007 were moving to Office 2007 in the next 12 months .)
So then the question becomes-Why build on a platform? I think Andrew Coates answered this beautifully in his standing on the shoulders of giants post a year ago. if you haven't already, read it. [aside: Initially, you'll wonder why he goes into such detailed history... But later, perhaps pondering it while stuck in line at the local supermarket, or caught in a boring meeting, it'll suddenly fall into place, and you'll understand the necessity of working with a platform.]
With vsto, you get to build on top of the Office Platform, using the vast functionality of the. NET Framework.
Vsto-Hurdles
Vsto isn' t without its problems. for one, you 've got a whole lot of extra weight you need to ship with your app (including a bunch of extra DLLs called primary InterOP assemblies-I'll be explaining those things in a later post -Plus the vsto runtime, and of course.. NET Framework ). but That isn' t the main thing...
DeploymentHas been the biggest hurdle to vsto adoption. getting your add-in out there and easy to install isn' t the simple task it shoshould be. v3 has certainly improved the process, but there's still work to be done. and as mentioned in an earlier post, a big focus of the upcoming vs2008 SP1 enhancements has been to make vsto deployment even easier. andrew Coates links to a number of good resources on vsto deployment.
[Assuming those issues are resolved shortly, there is really only one further hurdle:Mindset. I 've mentioned this previusly, and I think it still stands, but since it isn' t really to do with understanding vsto itself I won't go into details here.]
Vsto-where are the examples?
One of the frustrations I 've found with vsto is finding some good real-world examples. sure, there's plenty of code samples, and the odd code gallery post, but there's nothing detailing specified cial applications that I can find (I'm hoping someone corrects me on this ). there's nothing on the Microsoft case studies site (the closest I cocould find were some Oba case studies that mention vsto ), and there's nothing in any blogs that I can find pointing to cool vsto apps available for download.
That's not to say there aren't plenty of add-ins for outlook, Word, Excel, etc out there, it's just that I can't be certain if they were built using vsto or not. for example, xobni is a nice little outlook add-in, but doesn' t appear to use vsto. hopefully I can add some examples to this section soon.
Vsto-Resources
I'll be linking to a full list of vsto resources in a future post, but for now start here: vsto portal on msdn. then go here for a getting started with vsto guide. for hands on detail, take a look at this helpful forum post by the awesome Cindy Meister and these how do I videos on the office Dev center. for blogs and articles head over to officezealot and of course the official vsto blog. I 've also listed some other resources on my vsto page.
Also, if you're interested I have a separate feed for my vsto related posts: vsto
Vsto-Summary
- Visual Studio Tools for office is a set of Visual Studio project templates and runtimes for building add-ins for Microsoft Office programs.
- Vsto is mature (now in its fourth version) and easy to use. It has overcome come versions of the deployment hurdles it had in the past, but still has a few to resolve.
- The latest version uses Visual Studio 2008 and the. NET Framework 3.5 and can create add-ins for just about any Office 2003 or Office 2007 app.