Office client developer enhancements with VS 2010

At the Office Developer Conference last year Bill Gates remarked, “If you look at the success of our software or any software, this emphasis on it being a platform, reaching out to developers, having great tools has been the key to its success.”


Since the beginning, Office has included features which enable developers to extend the Office applications and allow them to become a better functional fit. With the introduction of Visual Studio Tools for Office in 2003, we ensured that .NET developers could easily build solutions which integrate back-end business data into the standard Office applications that are used on a daily basis.


Visual Studio 2010 extends this and includes some dramatic improvements which will ease the development, deployment, and management experience for your solutions which complement the Office suite.


Installation and configuration is often the most challenging task for Office developers.  For VS 2010, we have focused on providing developers and IT professionals the flexibility needed to customize the deployment experience while simplifying some of the common challenges faced by all Office developers. We recognize that it is critical for developers to be able to ensure a smooth end-user installation experience, particularly when the solution being deployed provides access to the business‑critical data that information workers need to do their jobs.  There are three key improvements we’re making in VS 2010 timeframe:



1.     PIA-less Interoperability

If your solution uses the CLR v4.0, you’ll be able to use a new feature which will embed a closure of the interop type interfaces your solution needs directly in your application assembly. This reduces the overall application footprint by removing the 6.3Mb PIA redist file and embedding only those interop types used. And, you’ll have one less worry during installation. 


2.     Publish to SharePoint

When we introduced ClickOnce deployment for Office solutions with Visual Studio 2008, you could easily publish solutions to a Web site, UNC share, or CD/DVD media.  With VS 2010 you’ll be able to publish documents to SharePoint servers as well.  This means that you no longer have to manually upload the document to SharePoint and maintain a network location from which the assemblies are installed when the document is opened.  Simply select a SharePoint Document Library as an option in the publish wizard and the customized document will be added to the appropriate document library; the assemblies will be stored on the SharePoint server itself.  This eliminates the requirement of having both a SharePoint server and a UNC share for deploying document solutions to SharePoint. 


3.     Customize the Deployment Package

As Office solutions become more sophisticated and provide integration across multiple Office applications and backend data sources, you may require more customization during install.  With VS 2010, you can deploy multiple solutions in a single deployment package, so your users can install both Word and Excel add-ins at once.  You’ll also be able to include post deployment which will run after the solution has been installed.  This allows you to set up a database connection, add registry entries, or copy documents to the end user computers. 


At the PDC in 2008, Anders Hejlsberg introduced several new C# features in VS 2010 which will dramatically simplify interoperating with COM based OMs exposed in Office. For instance, in the following example, we just want to save the document of the object doc to the filename Test.docx.  This is what you’d write today:


object fileName = “Test.docx”;

object missing  = System.Reflection.Missing.Value;

doc.SaveAs(ref fileName,

    ref missing, ref missing, ref missing,

    ref missing, ref missing, ref missing,

    ref missing, ref missing, ref missing,

    ref missing, ref missing, ref missing,

    ref missing, ref missing, ref missing);



With VS 2010, the previous code changes to one simple line!


object fileName = “Test.docx”;




Another new language feature of C# is named arguments.  Those of you who familiar with VB but who use C# may appreciate the added readability and flexibility this adds to your code.


var result = namedRange.Find(

              MatchCase: true,

              What: “dog”,

              SearchOrder: XLSearchOrder.xlByRows);



With Visual Studio 2010 and .NET FX 4.0, we want to continue making it easy for you to build and deploy .NET based solutions for Office.




Comments (30)

  1. Kris says:

    Awesome! Just can’t wait to get for VS2010. Does the VHD file for CTP has these bits in it?


  2. Ken Palmer says:


    These enhancements are very welcome.  Last year I was asked to estimate work on an add-in for Outlook 2007 that expanded management of Tasks for executives.

    The core requirements I was given were:

    – Enable one user to add tasks to another user’s task list.

    – Enable user to retrieve and edit another user’s personal contacts.

    – Alert user when a new task has been added by another user.

    – Install/Uninstall functionality needs to exist that can be deployed remotely.

    Ramping up on VSTO was challenging primarily because of limited documentation and unexpected road-blocks.

    One road-block was Visual Studio 2008 closing unexpectedly when building a fresh Outlook Add-In.  I have PowerCommands installed.  Apparently there was a CLR-related problem that surfaced when the combination of PowerCommands and an Outlook 2007 add-in was compiled.  A Microsoft engineer was able to isolate the issue, provide a workaround, and credit my support incident.  My experience with Microsoft assistance has been top-rate.  Nevertheless, this issue slowed me down.

    Another problem was finding implementation instructions for what I consider basic Outlook functionality.  For example, saving a command bar position in Outlook 2007 was difficult.  Suppressing the add/remove buttons in a command bar (these appear when you select the right-most down-arrow in a command bar) was impossible, and not documented at MSDN.

    Most frustrating was the Desktop Mail Alert Notification.  This is the very useful email alert that appears in the System Tray when a new message arrives.  Our client requested that we offer a similar alert for new Outlook Tasks.  You would think since this is an apparently native Outlook function, that there would be methods we could program against in VSTO to expand that.  There is none.  Nothing in the MSDN documentation enables you to do this.  And the experts I consulted on the VSTO forum (which was very good by the way) did not know of any means to access this.

    Please, please, please give us a way to create Desktop Alert Notifications for other Outlook related events, like receiving new Tasks.  If it’s not a part of VS 2010, then get that in the pipeline for a service patch or Visual Studio enhancement.

    More importantly, please invest in thorough documentation of VSTO for Visual Studio 2010.  Sue Mosher was a huge help in the questions that I posed at the programming forum.  But her book, "Microsoft Outlook 2007 Programming", uses VBA examples rather than .Net code.  And at the time that I worked on this project, the Microsoft Press book "Programming Applications for Microsoft Office Outlook 2007" was for Visual Studio 2005, not 2008.

    Ultimately our client decided to purchase a 3rd party solution because our programming estimate was 450 hours.

    You can read some of my exploits here:

    Thanks for keeping us informed on the RSS feeds.

  3. Kris –

    Some of the features mentioned in Soma’s blog are available with the CTP bits we gave out at the PDC. Included in the CTP is a walkthrough titled, "Office Programmability in C# and Visual Basic" which will take you through some of the C# language features and PIA-less COM Interop.

    The ability to customize your deployment package, to publish to Sharepoint, and PIA-less COM Interop with the VSTO templates will be coming in the next CTP.


  4. ISVs have been building solutions to integrate back-end business data into the standard Office applications.

  5. Publicación del inglés original : Sábado, 10 de enero de 2009 15:19 PST por Somasegar En la conferencia

  6. J says:

    What command line alternatives does microsoft offer over grep and gvim?   Please, if you could show a short video clip of how you accomplish a similar task as I outline below, I’d be much obliged.

    The task? Search through multiple files for certain string sequence, read to the end of line for that sequence, write this data to a file and then graph the columns of interest on Y axis, as multiple series, and use the (parenthesis) $1 variable for the X axis value.

    1. Does MicroSoft have an alternative to the ancient, but extremely efficient, tools such as grep on windows to search through multiple files and then pipe the output to another file and then use vim or gvim to view and assure I’ve got the the data of interest?

    grep "SNR[" *.txt >> snt.t

    gvim snt.t

    And most importantly, graph the data of interest in a scatter plot.  Because now I cut and paste this data into excell. Then use data->text-to-column capability in excell and seperate by delimiters.

    The ideal application will create that scatter plot of regexed data from one line typed into the cmd entry.  

    Note:(parenthesis) and $1 or $2, etc are an allusion to perls nice feature of storing and recalling multiple variables from a regex query.

    For data harvesting, I’m looking for the uSoft tool that is the equivalent of grep and gvim.

  7. says:

    MS has always placed Office development tools at a ridiculously high price. Idaelly, VSTO should also be there in the Express and Standard SKUs, not just Professional (which is quite expensive for single developers). Please include VSTO in the lower SKUs, don’t make VSTO development an ultra-premium feature.

  8. Everyone is, of course, on the lookout for any morsel of information about the next version of SharePoint

  9. Mark Gordon says:


    What about reading and writing native office file formats (most importantly excel) to and from a datasets by calling a method instead of writing 100’s of lines of c# code to do something foxpro pulled off in a single line of code.

    How can we get excited about no longer having to use reflection? This should have be implemented correctly the first time. Reflection was just some nonsensical glue code to workaround the normal bugs in VS.

    You wrote Bill said in part "having great tools has been the key to its success" which tool is he referring too, I assume the 6.0 era of dev tools, as VS is at best, marginally acceptable, unless you like writing code to patch holes in VS instead of actually being productive then you might consider it great.

  10. Erika Ehrli says:

    I’ve spent the last few days pulling 2008 metrics for Office & SharePoint developer content. It’s

  11. Windows PowerShell has a cmdlet that works like Grep called Select-String.  Select-String will match (.NET, not Perl) regular expressions, and supports named captures ($1, $2 etc).  You can also script UIs with PowerShell, so turning these named captures into a graph should be fairly trivial, but beyond the scope of this comment.

    Hope this Helps,

    James Brundage [MSFT]

  12. Support your own frameworks says:

    Eh, Somasegar, before we all go getting totally tumescent about the new stuff you guys are laboring day and night to throw into VS 2010, has anyone in MS given any thought whatsoever to tackling the question of providing tools that work with the existing frameworks you have provided? I’m talking of course about WWF, in VS2005 and VS2008. The WF designer in both is, quite frankly, a great big steaming pile of squirrel turd. It’s not release-ready software at all. Abysmal performance, frequent crashing – It makes me want to tear my own leg off and beat the computer to splinters with it You need to sort it out, seriously. Or were MS just "having some fun" with WWF and is it going to go the way of LINQ2SQL?

  13. Pravin Indurkar (MSFT) says:


     Regarding the WWF Designer in 2005 and 2008, I would like to understand any specific issues that you are having so we address them. We have done a lot of work to improve performance between VS2005 and VS2008. However if there are any specific issues I would like to understand them and address them. If you prefer please give me an email where I can contact you directly.


    Pravin Indurkar (MSFT)

  14. Pravin Indurkar (MSFT) says:


     Regarding the WWF Designer in 2005 and 2008, I would like to understand any specific issues that you are having so we address them. We have done a lot of work to improve performance between VS2005 and VS2008. However if there are any specific issues I would like to understand them and address them. If you prefer please give me an email where I can contact you directly.


    Pravin Indurkar (MSFT)

  15. "having great tools has been the key to its success" This is the most important peace of Bill Gates sentence. VSTO when released many years ago was not a "great tool" and still after all these years the quality and the lack of important features is very limiting (Macro-recording for example). The need for installation is also a big issue in most places where "home-made" solutions are forbidden by central IT-policies. Put at least some effort in making VBA better instead of throwing away all money in the "black hole" of Visual Studio and VSTO, please!

  16. Support your own frameworks says:

    @Pravin: I don’t have a webmail at the moment that I can just give out on a message board. I will get one and put together my thoughts, and I will come back to you on this. Alternatively, if you have a mail address you don’t mind posting on the message board i’ll be happy to mail you privately.


  17. cjw says:

    Are these available with the CTP? Also, do you have any write ups on <a href="">Outlook Track-It</a>? That is the best plugin/addon right now for me. I love the toolbar that sets followup reminders.

  18. Pravin Indurkar says:

    @Support your own frameworks

    I certainly understand not posting email ID. Please put together your thoughts and post, I am looking forward to reading them.

    Pravin Indurkar, MSFT

  19. Sneak Peaks into SharePoint Developer Tools in Visual Studio 2010

  20. Catto says:

    Hey Now Soma,

    Nice post.

    Thx 4 the info,


  21. flannel says:

    Terrific news, I look forward to the day we can begin developing with VS 2010 and SharePoint.  No more SPD headaches.

  22. JEHAD says:


  23. JEHAD says:


  24. Somasegar says:

    As far as I know, there isn’t an easy or automated way to move your Access application to VS.


  25. همانطور که قبلاً در این پسُت توضیح دادم، مایکروسافت در VS 2010 قابلیت های جدیدی برای برنامه نویسی در

  26. SkunkWorks says:

    Lo llamar&aacute;n SharePoint 14, SharePoint 2010, ni idea como, pero est&aacute; llegando a pasos agigantados

  27. SkunkWorks says:

    Lo llamarán SharePoint 14, SharePoint 2010, ni idea como, pero está llegando a pasos agigantados. En

  28. Robert says:

    CJW, I read a few blogs on Outlook Track-It. From what I hear, it’s an awesome followup email reminder plugin. I’m going to grab it as soon as I get the new PC. It’s definitely a recommended addon for GTD.

  29. I’ve just developed my first Word 2007 add-in using Visual Studio 2010, it is great!

    What’s impressive as well is the stability even at the beta 1/beta 2 stages of the product.

    Can’t wait for RTM