Michell Cronberg made a presentation of VSTO 3.0 SP1 intro at Microsoft 17/09-2008.
It was the first time I saw him live, so the expectations were big. And he didn’t disappoint – only the opposite. He knows his stuff and he presented it, so you got the feeling that this is a nice toy you want to play with.
With the easiness it has become to write office addins (and docs) and deploy them, then you only need to tell the customers that such a possibility exists.
- Michell’s slides
- Michell’s code
- How Do I videos
- Book: VSTO Using C# with Excel… (2nd edition ready Feb 2009) – And a VB edition
- Article: Understanding the Word Object Model…
- Article: Understanding the Excel Object Model…
What and Why?
VSTO comes in two categories:
- App level. This is addins.
- Doc level. This is functionality added to a document or a template
Those solutions often inludes that VSTO integrates into Office using a visual custom control in panes or menues.
When using a visual control it might be easy to write it in .NET. Or if you want to code anything you think is easiest to do from .NET then use VSTO.
But VSTO is only a wrapper on top of the office COM interfaces, so VBA is just as valid for interacting with office.
If you have old VBA code then there is no need to worry. Just keep it.
You can actually also go the other direction: From VBA to VSTO. Then you could let VSTO be a gateway to some external data and feed them to VBA.
Think of Office as the presentation layer in which you add some extra functionality like a Custom Control or Web Part in ASP.NET.
On the serverside Office is not included. So if you need to work on a document there the answer is Open XML SDK.
More on App level and Doc level: See Michell’s slides.
Installing prerequisites for running VSTO code is very easy. Before you start you should have Office 2k3 or Office 2k7 installed. After that use Michell’s ClickOnce setup.
It will download and install what is missing of the following:
- .NET framework 3.5 SP1
- VSTO 3.0 runtime
- Office 2k7 PIA (Primary Interops – .NET interops for the Office COM interfaces)
- Michell’s VSTO addin valutakurser2k7
Installing prerequisites for developing VSTO projects also includes:
- Visual Studio 2k8 Pro (has VSTO integrated)
- has a doc level designer
- has a ribbon designer
- VSTO Power tools 1.0 (download this! And Intro)
- Short office method overloads for C# designers (Interop extensions)
- MDI/SDI problems solved using Office UI Mgr
- More… See Michell’s slides
- Optional: Open XML SDK (for serverside doc handling)