extending word, excel and infopath 2007 marc gusmano the information management group...

Post on 26-Mar-2015

223 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Extending Word, Excel and Extending Word, Excel and InfoPath 2007InfoPath 2007

Marc GusmanoMarc GusmanoThe Information Management GroupThe Information Management Group

marcg@imginc.commarcg@imginc.com

Extensible UI elements

• Ribbon– Access, Excel, Outlook, PowerPoint,

Word

• Task Panes– Access, Excel, Outlook, PowerPoint,

Visio, Word

Ribbon

• New extensibility model “RibbonX”• Build first-class UI directly into

application ribbon space • Existing solutions continue to work

Existing SolutionsExisting SolutionsXLMXLM

WordBasicWordBasic

CommandBars (‘96)CommandBars (‘96)

WLL, XLLWLL, XLL

XLA, PPA, Word global templatesXLA, PPA, Word global templates

In Excel, “Init Menus” registry keyIn Excel, “Init Menus” registry key

Attached Toolbars in Word & ExcelAttached Toolbars in Word & Excel

Other technologiesOther technologies

And it all still works!And it all still works!

Existing SolutionsExisting SolutionsCustom MenuCustom Menu

Custom ButtonsCustom Buttonson Formatting Toolbaron Formatting Toolbar

Custom ToolbarsCustom Toolbars

Mapping Existing SolutionsMapping Existing Solutions

If your code added a… it appears in…

Control to a built-in menu the 'Menu Commands' group

Control to a built-in toolbar the 'Toolbar Commands' group

Custom toolbar the ‘Custom Toolbars’ group

… on the Add-Ins Tab

RibbonX…RibbonX…Is a consistent, XML-based developer model Is a consistent, XML-based developer model for Microsoft Office UIfor Microsoft Office UI

Produces well-behaved solutions by defaultProduces well-behaved solutions by default

Exposes new control typesExposes new control types

Targets specific developer scenariosTargets specific developer scenarios

RibbonX BasicsRibbonX BasicsAdd your own tabsAdd your own tabsAdd to built-in tabsAdd to built-in tabsAdd to the Add to the Microsoft Microsoft Office menuOffice menuAdd to built-in Add to built-in contextual tabscontextual tabsRemove tabs, Remove tabs, groups, controlsgroups, controls

RibbonX ControlsRibbonX ControlsTabsTabs

Groups Groups

ButtonsButtons

MenusMenus

SplitButtons SplitButtons

ToggleButtonsToggleButtons

LabelsLabels

CheckBoxesCheckBoxes

RibbonX ControlsRibbonX ControlsEditBoxesEditBoxesDialogBoxLaunchersDialogBoxLaunchersDropDownsDropDownsComboBoxesComboBoxesGalleriesGalleries

RibbonX MarkupRibbonX Markup

Declarative XMLDeclarative XML

Easy to understand, localize, generateEasy to understand, localize, generate

Separates UI from your business logicSeparates UI from your business logic

Gets applied to UI at add-in or document Gets applied to UI at add-in or document loadload

RibbonX Markup

<tab idMso=“TabHome”><tab idMso=“TabHome”><group id=“myGroup” label=“My Group”><group id=“myGroup” label=“My Group”>

<button id=“hw” label=“Hello World!” <button id=“hw” label=“Hello World!” onAction=“myHelloFunc” />onAction=“myHelloFunc” />

</group></group></tab></tab>

RibbonX Entry PointsRibbonX Entry PointsNew File Format Documents (VBA solutions)New File Format Documents (VBA solutions)

Include customUI markup as a partInclude customUI markup as a part

COM Add-Ins (Visual C#, Visual C++, Visual Basic .NET, COM Add-Ins (Visual C#, Visual C++, Visual Basic .NET, Visual Basic 6.0)Visual Basic 6.0)

Return customUI markup via Return customUI markup via IRibbonExtensibility IRibbonExtensibility interfaceinterface

Visual Studio 2005 Tools for the Microsoft Office system Visual Studio 2005 Tools for the Microsoft Office system (VSTO) Cypress & V3 Solutions(VSTO) Cypress & V3 Solutions

Same as COM, but more convenientSame as COM, but more convenient

Adding Custom Items to the Ribbon

Task Panes

• Space to host custom UI within the Office applications

• Any ActiveX control, easy to build in VS

• Can host WPF

Task Panes

• Built as part of same app-level add-in that contains RibbonX

• Ribbon button typically used to launch task pane

• Custom code can connect to back-end data sources (bring LOB data directly into Office UI)

• Programmatically alter the document

Adding Custom Task Pane

2007 Microsoft Office System

InfoPath forms solutions

Smart Client and BrowserSmart Client and BrowserWSS, SQL, ERP, CRM…WSS, SQL, ERP, CRM…

InfoPath Form Template Design

• Declarative design surface• New features

– Import existing Word/Excel forms into InfoPath 2007– Create form template parts for re-use across forms– Use logic inspector to help debug declarative

business rules– Use design checker to design for the targeted

environment and run compatibility checks

Using the FormControl .NET

component

Integrating Forms Into Web Sites

• Build custom UI, provide additional functionality on the page– Add a link with query params to open form in its own browser window– Embed form as a control in aspx page– Using the form control– Placing other chrome and controls around the form– Dynamically loading forms– Changing the data in the form– Getting the data from the form– After the form has been submitted…

• ASPX page needs to run on the server where InfoPath Forms Services is available

Deploying an InfoPath form to a SharePoint

site

ResourcesResources

Microsoft Office Developer CenterMicrosoft Office Developer Centerhttp://msdn.microsoft.com/office/

Ribbon Developer CenterRibbon Developer Centerhttp://msdn.microsoft.com/office/tool/ribbon

UI BlogUI Bloghttp://blogs.msdn.com/jensenh/

see the developer sectionsee the developer section

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

top related