+ All Categories
Home > Documents > Andrew Coates Microsoft Australiadownload.microsoft.com/documents/hk/technet/techday… ·  ·...

Andrew Coates Microsoft Australiadownload.microsoft.com/documents/hk/technet/techday… ·  ·...

Date post: 30-May-2018
Category:
Upload: ngonga
View: 213 times
Download: 0 times
Share this document with a friend
33
Transcript

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/

Agenda

Why Office Dev

VS2010 features

VSTO4-specific

OpenXML SDK

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

VS2010 FEATURES

Language Features

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

Automating Excel and Word (VB.NET)

VS2010 FEATURESNo-PIA deployment

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)

Automating Word (C#)

Better Deployment

Multi-Solution Deployment

Post Deployment Actions

New Publish Options Dialog

COOL TOOLSOpen XML SDK

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

Open XML SDK

REMEMBERAnything you can do in .NET you can surface in Office

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

Andrew Coateshttp://blogs.msdn.com/acoat

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)

Track Resources

Resource 1

Resource 2

Resource 3

Resource 4

Complete an

evaluation on

CommNet and

enter to win!

© 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.


Recommended