次の方法で共有


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";

doc.SaveAs(fileName);

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.

Namaste!

Comments

  • Anonymous
    January 10, 2009
    PingBack from http://www.codedstyle.com/office-client-developer-enhancements-with-vs-2010/

  • Anonymous
    January 11, 2009
    Awesome! Just can't wait to get for VS2010. Does the VHD file for CTP has these bits in it? Thanks.

  • Anonymous
    January 12, 2009
    Soma, 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: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.outlook.program_forms&mid=82dce6db-527a-48ee-b404-13eea6cb895b http://social.msdn.microsoft.com/Search/en-US/?Refinement=112&query=kenpalmer+meta:Search.MSForums.ForumID(0e69520a-0af0-4085-a8c4-c5f21ce20e01) Thanks for keeping us informed on the RSS feeds.
  • Anonymous
    January 12, 2009
    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. -Amanda

  • Anonymous
    January 14, 2009
    ISVs have been building solutions to integrate back-end business data into the standard Office applications.

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

  • Anonymous
    January 15, 2009
    The comment has been removed

  • Anonymous
    January 16, 2009
    The comment has been removed

  • Anonymous
    January 17, 2009
    Everyone is, of course, on the lookout for any morsel of information about the next version of SharePoint

  • Anonymous
    January 19, 2009
    The comment has been removed

  • Anonymous
    January 20, 2009
    I've spent the last few days pulling 2008 metrics for Office & SharePoint developer content. It's

  • Anonymous
    January 21, 2009
    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]

  • Anonymous
    January 29, 2009
    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?

  • Anonymous
    January 29, 2009
    Hi,  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. Thanks Pravin Indurkar (MSFT)

  • Anonymous
    January 29, 2009
    Hi,  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. Thanks Pravin Indurkar (MSFT)

  • Anonymous
    February 03, 2009
    The comment has been removed

  • Anonymous
    February 04, 2009
    @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. Cheers.

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

  • Anonymous
    February 04, 2009
    @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

  • Anonymous
    February 19, 2009
    Sneak Peaks into SharePoint Developer Tools in Visual Studio 2010

  • Anonymous
    February 20, 2009
    Hey Now Soma, Nice post. Thx 4 the info, Catto

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

  • Anonymous
    February 27, 2009
    I HAVE MANY APPLICATIONS ON ACCESS 2003 (FORMS , REPORTS )AND I WANT TO CONVERT IT TO Visual Studio 2005 SO IS THERE ANY WAY TO MAKE THIS CONVERT...

  • Anonymous
    February 27, 2009
    I HAVE MANY APPLICATIONS ON ACCESS 2003 (FORMS , REPORTS )AND I WANT TO CONVERT IT TO Visual Studio 2005 SO IS THERE ANY WAY TO MAKE THIS CONVERT...

  • Anonymous
    February 28, 2009
    As far as I know, there isn't an easy or automated way to move your Access application to VS. -somasegar

  • Anonymous
    March 03, 2009
    همانطور که قبلاً در این پسُت توضیح دادم، مایکروسافت در VS 2010 قابلیت های جدیدی برای برنامه نویسی در

  • Anonymous
    March 08, 2009
    Lo llamar&aacute;n SharePoint 14, SharePoint 2010, ni idea como, pero est&aacute; llegando a pasos agigantados

  • Anonymous
    March 08, 2009
    Lo llamarán SharePoint 14, SharePoint 2010, ni idea como, pero está llegando a pasos agigantados. En

  • Anonymous
    May 06, 2009
    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.

  • Anonymous
    November 16, 2009
    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 regards, Malcolm.