Andrew CoatesMicrosoft Australiahttp://blogs.msdn.com/acoatSession Code: OFC343
Once upon a time
I wrote VFP CodeI interacted with OfficeI wrote DDE code!I automated
WordExcelOutlook
I output HTML and pretended it wasWordExcel
Replace this slide with a picturehttp://www.flickr.com/photos/valerianasolaris/3626032099/sizes/o/
Why build on Office?
Provide solutions that match internal processes
Integrate data where users make decisions
Build instantly familiar applications
Office Development in VS 2010
Provide familiar VS Pro dev experiencesProject TemplatesVisual DesignersIntegrated Debugging
Make it easy to access LOB dataConnect to multiple backend data sourcesDesign data models & expose them through servicesRAD data binding support
Enable seamless deploymentSmooth end-user experience
It’s all about context
Building Office Client Apps in VS 2010
Design-timeTarget Office 2007 or Office 2010COM Interop from C# is now as easy as VBRAD Databinding Support
RuntimeRuntime ships with Office 2010Embed Interop TypesTarget FX 3.5 or 4
DeploymentLess pre-reqs to worry aboutDeploy multiple add-ins in a single packageCustom actions run after solution is deployedMachine wide install of add-ins
Office Development in Visual Studio
VS 2005
• Design Word & Excel 2003 document solutions• Develop application add-ins for Office 2003
or 2007 (RTM + SE)• Display action panes / custom task panes
in your application
VS 2008
• Target Office 2003 or Office 2007• Use Visual Designers to create custom Ribbon
and Outlook UI• Deploy Office solutions with ClickOnce• Define SharePoint Workflows
VS 2010
• Target Office 2007/2010 and SharePoint 2007/2010
• Design and Debug SharePoint solutions• Improved OBA Deployment
Designtime Tooling
Application level or document add-insOffice 2007 and Office 2010 Project TemplatesTarget Office 32 or 64
Visual DesignersCustomize Ribbon UICreate Outlook Form RegionsAction Panes/Custom Task Panes
DatabindingWord Content controlsExcel List ObjectsWinForms/WPF
Office 2010 64-bit support
Design timeVS remains 32-bit and can support Office 64-bit as well as Office 32-bit (WOW) scenarios
VS will host 64-bit Word and Excel designers for document solutions
Runtime32 and 64-bit versions of VSTO Runtime
Smart Bootstrapper automatically installs the right version
Office Extensions for .NET
VSTO Runtime 2010 (the redist) containsOffice extensions for .NET 3.5
Office extensions for .NET 4.0
Office Extensions for .Net 4.0New model for version resiliency
Uses CLR4.0 type embedding and type equivalence
No runtime dependency on Office PIAs
Performance improvements
Language Features
Visual Basic .NETAuto-implemented properties
Statement lambdas
Collection initializers
Implicit line continuation
C#Optional and named parameters
Optional ref parameter modifier
Dynamic dispatch on COM calls returning Object
.NET 4.0: VB Enhancements
Auto PropertiesImplicit Line continuation
DynamicCollection Initializers
Statement Lambdas
.NET 4.0: C# Language Enhancements
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);
namedRange.Find("dog", xlByRows, MatchCase: True);
Named argument
dynamic result = namedRange.Find(MatchCase: True,what: "dog",
searchOrder: xlByRows);
Arguments evaluated in order written
Named arguments can appear in any order
doc.SaveAs("Test.docx");
Optional Params
result.ClearContents();
Late-binding through “dynamic” type
Compiling without Primary Interop Assemblies (PIAs)
Use PIAs at design-time, not runtime
No need to deploy PIA to user’s machine
Compiler embeds the specific members of the specific types used into your assembly. (Prevents assembly from becoming bloated)
VSTO4-specific
Deploying Multiple Office Solutions in a Single ClickOnce Installer
Open XML SDK
Wrapper classes forSystem.IO.Packaging and ISO29500
Awesome ToolsOpen XML Class Explorer
Open XML Diff
Document Reflector
Free (as in Beer)
Great Community
http://www.OpenXmlDeveloper.org
Resources
These Slideshttp://www.microsoft.com/hk/techdays2009
DownloadsVisual Studio 2010 Beta 2
ISO
Install from Web
Visual Studio 2010 Training Kit
Open XML SDK
Office Dev Centerhttp://msdn.microsoft.com/vsto
Resources
BlogsVisual Studio Office Development Team Blog:http://blogs.msdn.com/vsto/
Beth Massihttp://blogs.msdn.com/bethmassi/
John R. Durant Blog: Office Developer Topicshttp://blogs.msdn.com/johnrdurant/
Office Developer Guildhttp://www.facebook.com/pages/ODG/121902081583
http://microsoft.com/technet
Resources for IT Professionals
http://microsoft.com/msdn
Resources for Developers
www.microsoft.com/learning
Microsoft Certification & Training Resources
Resources
Related Content
Breakout Sessions (session codes and titles)
Interactive Theater Sessions (session codes and titles)
Hands-on Labs (session codes and titles)
Hands-on Labs (session codes and titles)
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.