VSTO 2005 Second Edition – hot off the press

VSTO 2005 Second Edition Beta (aka VSTO2005SE) – this is a new free product that complements VSTO 2005. See this announcement from KD Hallman if you want to know general details about the product and the roadmap.

I am here to discuss technical details of what it is. First of all – there is a new design time experience for building managed Add-Ins for Office 2003 applications (Excel, Word, Outlook, Visio and PowerPoint – this is for those who use Office 2003 and VS 2005) as well as support for building managed Add-Ins for Office 2007 applications (InfoPath jumped on this band wagon as well).

There is not much difference between Office 2003 and Office 2007 projects. Here, I can count those differences below:

  • Office 2003 projects by default reference Office 2003 PIAs while Office 2007 by default references Office 2007 PIAs
  • Office 2007 projects (except for Visio) do have CustomTaskPanes collection that allows you to easily put WinForm controls onto app level task panes.
  • Office 2007 projects (except for Visio and InfoPath) do support easier creation of Ribbon.xml files and hooking those up. So, getting a vanilla Ribbon takes about 30 secs.

The VSTO2005SE projects are very similar to what the Outlook Add-In project looked in VSTO 2005. The very first difference is that the name of the entry point class has changed – it is not longer ThisApplication, but is rather ThisAdd. So, instead of writing this.Inspectors to get to the Outlook’s Inspectors collection you will write this.Application.Inspectors.

If you want to take advantage of new Office 2007 functionality that is exposed to add-ins you will need to implement a ComVisible public class deriving from any arbitrary interface e.g. IRibbonExtensibility, FormRegionStartup (one does not have to implement ICustomTaskPaneConsumer – VSTO runtime takes care when you call ThisAddin.CustomTaskPanes.Add(new UserControl(), “My task pane”). Next you will need to return this class from ThisAddIn’s RequestService override. Here is a little example:

    public partial class ThisAddIn


        private Ribbon1 ribbon;


        protected override object RequestService(Guid serviceGuid)


            if (serviceGuid == typeof(Office.IRibbonExtensibility).GUID)


                if (ribbon == null)

                    ribbon = new Ribbon1();

                return ribbon;



            return base.RequestService(serviceGuid);





    public class Ribbon1 : Office.IRibbonExtensibility


Unless I missed something that pretty much concludes the general design time discussion. In my next posts I will probably talk more about how to add a Ribbon to VSTO add-ins.

We will also be shipping a new VSTO runtime redist. Unlike, VSTO 2005 Design Time – the new redist is not a new product, but is rather an upgrade for the original runtime redist. The reason for the runtime upgrade is that it incorporates this addition CustomTaskPanes functionality and support for arbitrary services that VSTO customizations can now expose. Also, we fixed a number of breaking changes in Excel’s ListObject functionality that affected the behavior of ListObject’s data-binding on Office12.

One final note – you MOST probably will have trouble using this software if you ever installed VSTO v3 CTP – unfortunately, due to the poor setup support in VSTO v3 CTP, uninstalling it won’t solve the problem. You may try to uninstall any the CTP, VSTO 2005 and all the traces of Visual Studio from the machine – then it MIGHT solve the problems. However, the most reliable solution is just re-installing the OS. That is not fun and I am profusely apologizing that you might have to do that. We did much better job with this release to ensure we do have a clear servicing path for this product.

Comments (21)

  1. Bryan says:

    Quick question … so if I take advantage of VSTO2005SE to create a managed add-in for Word 2003, can this add-in easily work with the actions pane (like a VSTO 2003 document level customization can)?

    Or are VSTO2005SE managed add-ins for Office 2003 essentially "replacements" for COM add-ins, except the loader process is now different (and thus shimming is not required)?


  2. Most of the gadgets that are available to doc-level customization were out of scope for VSTO2005SE – one of those is ActionsPane. Actually, since I know a lot of internals of VSTO I would probably be able to hook up ActionsPane from app-level add-in – but this implementation would not be for weak hearted – hence I will keep it to myself for a while in the incubation stage.

    So, yes, shimming is not required for those add-ins and essentially those are the better story for managed add-ins then shared add-ins.

    Among the features that are shared between doc-level and app-level stuff is deployment and security models and appdomain isolation We have also added Excel’s LCIDProxy for Excel add-ins to allow managed code to run easily on non-ENU systems.

    In the future we are looking into bringing doc-level features over – but we do not know what the delivery vehicle for this would be.

  3. VSTO 2005 Second Edition (SE) Beta (codenamed "Cypress") has been released on the web …

  4. Bryan says:

    Misha —

    Thanks for the reply.

    So if I’m reading your reply correctly, if I want to interact with the actions pane (i.e., add WinForms controls that interact w/ the document) in Word 2003, then doc level customizations (stuff already provided in VSTO 2.0) are still that way to go?

    "….hence I will keep it to myself for a while in the incubation stage"

    Does the above mean there’s a chance that global 2003 add-ins may have support for interaction with the actions pane by the time VSTO 3 is released? If so, would that behavior be similar to custom task pane interaction in VSTO 3 + Word 2007.

    You probably see where I’m going here … we would love to see managed global add-in support that allows interaction with the actions pane/custom task panes for BOTH Word 2007 and 2003.

  5. Yep, I can hear you. I can not promize anything but I can tell you that we are thinking very hard about this.

  6. Bryan says:

    Thanks for the info Misha — this is very helpful.

    Global add-in support WITH actions pane/custom task pane interaction for Office 2003 would be *huge* for us. We are looking to develop a managed app level Word add-in (that makes heavy use of the actions pane/custom task pane) that supports both 2003 and 2007.

    Conceptually, we want a single base DLL (MyAddin.dll) that will work with both 2003 and 2007 and contain most of the code (including the user control that will be added to the actions pane/custom task pane). Then, we will create pluggable version specific DLLs (i.e., MyAddin.Word2003.dll and MyAddin.Word2007.dll) that will contain UI and object model specific code for each version of Word. For example, the Word2003 DLL will contain CommandBar specific code and will load the user control in the actions pane … the Word2007 DLL contain RibbonX specific code and will load the user control into a custom task pane. I think you get the idea.

    This would be *huge* for us, and enable us to support both 2003 and 2007 without writing two similar but separate codebases.

  7. Eckehard Pfeifer says:

    Hi, Misha, is it correct, that there are no project templates for Word docs and Excel workbooks/templates like in the v3 CTP? I installed the SE and have only templates for Add Ins for 2003/2007. Thank you for an answer.

  8. True, design time in SE only adresses the add-ins.

  9. billy2007 says:

    Hi Misha,

        After reading quite a few posts and trying out various shortcuts or hacks to acheive an "Application Level Task Pane" for Word 2003, i have really come to a grinding halt !! few of the paths that i followed were

    1. Tried to modify the XML of a WORD document by adding the _AssembleName=* and _AssemblyLocation custom document properties….

    2. I am now trying to acheive this by Attaching Managed Code Extensions to Documents…

    by that i mean Can I use the … Serverdocuement.Addcustomization …

    method to attach my custom task pane to any office 2003 word document/s through the add-in..!!

    .. i guess my question would be that in one of these posts Misha did point out that it is possible to attach a task pane at an Application level but could only be acheived by someone like her who knows the internals of ActionsPane and VSTO

    and it isn’t for the *****WeakHearted*****…. so if you could point me in the right direction or suggest an alternative, that would be great !!!

    I know that Custom Task panes are possible in word 12/ 2007… but i require to achieve this with word 2003 edition… as our target audience is not likely to move to office 2007 for quite some time !!!

    If i haven’t been clear please do ask for clarifications !!!

    thax in advance,


  10. Pranav Wagh says:

    while its not about VSTO 2005 SE..but i would love to know your thoughts on this ..  http://blogs.msdn.com/pranavwagh/archive/2007/01/06/here-is-a-question.aspx

  11. Michael P says:

    Hi Misha,

    one more voice for the actions pane access from within managed add-in. Currently our add-in uses a custom dialog floating on top of the document. We planned to put it into the actions pane once we drop Office XP support. But it looks there is still a long wait for us, as our customers do not upgrade to Office 2007 in foreseeable future and there is no easy way to exploit the actions pane in Office 2003.

    Any good news for us?

    Thanks a lot,


  12. Hi Michael,

    I am really sorry to disappoint you. Unfortunately, in this release we did not come around to supporting ActionsPane for the add-ins.

  13. Michael P. says:

    Thanks, Misha, for the quick reply. We’ll try to be more creative then.

  14. Wei says:

    Misha, Just to make sure I under you correct:

    VSTO 2005 SE does NOT support ActionsPane for Excel 2003?

    while VSTO 2005 does, on a document- level.

    If that’s the case, given our project heavily uses action pane and needs to support Excel 2003, I would stick with the VSTO 2005 ( 1st edition ).

    Pleaes advice.

  15. VSTO2005SE runtime is a superset of VSTO2005 runtime. So, ActionsPane for doc-level customization on Excel 2003 and Word 2003 is supported.

  16. The original deployment paper targeted deployment aspects of customizations built using VSTO 2005 release

  17. Ariel Yankilevich says:

    Guys, the financial industry is not going to support Office 2007 any time soon, we’re just now converting to Excel 2003…

    When are you planning to support creation of host items or at least working with actions pane in Excel 2003? Without this, the add-in has little use to us – we need to generate rich Excel spreadsheets from an application level add-in. Took me a while to realize this would not be possible via VSTO 2005 SE.

  18. Kim says:


    I am uploading my VSTO SE application to test for Office 2007.

    Can you tell me if through VSTO SE, i can support new default extensions of .xlsx,xlsm in my project. I am able to support .xls support for Office 2007. Basically what i am looking for is, if can i open through VSTO SE in office 2007 dedault extension of .xlsx and save in this format and open in this format

  19. Kim,

    Sorry, I could not understand what you are trying to do exactly so if you could clarify your scenario that would help. I will try to write something but I am not sure whether it directly applies to your scenario.

    If you have a customized .XLS file – you can save it as an .XLSX file without loosing functionality i.e. opening such file in Excel will cause the customization to run as expected.

    VSTO 2005 SE does not have additional support for directly designing in Office 2007 (as in VS2005 you could host .xls files directly inside Visual Studio), but again you can design using Office 2003 and then save files in new format.

  20. Gokul Bankar says:

    i dont know why microsoft missed document level customisation functionality with VSTO 2005SE,Which was available with VSTO2005.does it not looks like old was gold?and even 2005 is no more available.what to do?when microsot is going to release new one?now how to go with document level customisation?

  21. gokul says:

    Thanks VS 2010 that supports document level customisation.