Microsoft Office Overview Open XML Formats Extensible UI

Microsoft Office Overview Open XML Formats, Extensible UI, Info. Path and Forms Services, Workflow and Sharepoint Dave Glover http: //blogs. msdn. com/dglover

Agenda Office XML Formats Office Ribbon Extensibility Infopath Forms Sharepoint Workflow

Office Open XML Formats

Open XML Formats Architecture User view: single Office “file” File Container Document Properties Developer view: modular file Comments Document Parts Most parts are XML Each XML part is a discreet, compressed component Can add, extract and modify individual parts using any Zip implementation Corruption or absence of any part would not prohibit the file from being opened Word. ML / Spreadsheet. ML, etc. Custom-defined XML Images, video, sound Embedded code / macros Charts

Benefits Of Open XML Solutions No longer need to automate client applications to open and modify files Unsupported solution on server Clients not designed for this scenario Reliability Access directly the parts you need Avoid corruption Transparency Direct access to your data!

Tools for Accessing Data In Office Open XML files XML Editing Notepad? System. XML makes this easier ZIP Manipulation Compressed Folders in Windows Third-Party Zip Libraries Microsoft’s Packaging API’s (. NET Fx 3. 0) Office Open XML Resource Kit Code Snippets C# and VB. NET http: //www. microsoft. com/downloads/details. aspx? familyid=8 d 46 c 01 f-e 3 f 64069 -869 d-90 b 8 b 096 b 556&displaylang=en Validation Library Parses a file and reports on schema, relationship errors and warnings Serialization/Deserialization Library Flattens package into a single file for ease of development in simple construction scenarios

demo Open XML Format Custom XML Controls and Word Content Control Kit

System. IO. Packaging Part of Windows Presentation Foundations Ships with Vista Requires. NET 2. 0 Enables package manipulation for Office Open XML File Formats XML Paper Specification Files Any (ECMA) Open Packaging Convention files

System. IO. Packaging. Package Digital Signatures Specific Format Parts office. Document XML Part P a rt R e l s Package Relationships Package. Properties Parts Collections Streams Thumbnail Package Relationships Package class provides methods to create, enumerate and delete the following entities Common Package Parts Core Properties Etc… XML Part

Resources Open. XMLDeveloper. org msdn. microsoft. com/office Kevin Boske’s Blog http: //blogs. msdn. com/kevinboske Brian’s Blog http: //blogs. msdn. com/brian_jones XPS Blog: http: //blogs. msdn. com/xps

Office Ribbon Extensibility

The Fluent User Interface Microsoft Office Access, Microsoft Office Excel, Microsoft Office Outlook, Microsoft Office Power. Point, Microsoft Office Word “The Fluent Ribbon”

Ribbon Extensibility - “Ribbon. X” Developers can modify the Fluent Ribbon For example: remove tabs, add a tab, add a group Custom Tab Custom Group

Existing Solutions XLM Word. Basic Command. Bars (‘ 96) WLL, XLL XLA, PPA, Word global templates In Excel, “Init Menus” registry key Attached Toolbars in Word & Excel Other technologies And it all still works!

Existing Solutions Custom Menu Custom Toolbars Custom Buttons on Formatting Toolbar

Mapping 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

Excel, after you open a few hundred workbooks with attached toolbars…

Ribbon. X… Is a consistent, XML-based developer model for Microsoft Office UI Produces well-behaved solutions by default Exposes new control types Targets specific developer & customer scenarios

Ribbon. X Basics Add your own tabs Add to built-in tabs Add to the Microsoft Office menu Add to built-in contextual tabs Remove tabs, groups, controls

Ribbon. X Controls Tabs Groups Buttons Menus Split. Buttons Toggle. Buttons Labels Check. Boxes

Ribbon. X Controls Edit. Boxes Dialog. Box. Launchers Drop. Downs Combo. Boxes Galleries Only five controls in Microsoft Office 2003: mso. Control. Button, mso. Control. Edit, mso. Control. Popup, mso. Control. Combo. Box, mso. Control. Dropdown

Ribbon. X Markup Declarative XML Easy to understand, localize, generate Separates UI from your business logic Gets applied to UI at add-in or document load <tab id. Mso=“Tab. Home”> <group id=“my. Group” label=“My Group”> <button id=“hw” label=“Hello World!” on. Action=“my. Hello. Func” /> </group> </tab>

Ribbon. X Solution Space COM VBA App. Level Installed at app-level, UI always visible Word Global Template Excel Add-in (. xlam) PPT Add-in (. ppam) Doc. Level Installed at app-level, displays UI based on doc properties Word, Excel, Power. Point document Access Database VSTO Write a VSTO app-level solution Write a VSTO doc-based solution

demo Hello World Document

Features Targeting Developers Start. From. Scratch Global repurposing Referencing built-in controls and images <ribbon start. From. Scratch=“true”> <!– hides the main tabs --> <command id. Mso=“Save” on. Action=“run. My. Code” /> <!- takes over the built-in save action --> <button id=“x” image. Mso=“Save” label=“Imposter!” /> <!- “steals” the image of the Save button -->

UI Licensing Program Can I make a Ribbon in my own app? Licensing rights to build Office 2007 UI (ribbon) into 3 rd party applications 120 -page design guidelines document published License is royalty-free Easy to sign up (Web site click-through acceptance) Some small set of exclusions (direct competitors) Large community of licensees Approximately 35 early adopters helped shape the license terms and guidelines, hundreds have signed up Resources Web site: http: //msdn. microsoft. com/officeui Design guidelines and click-through license available there Specific questions should go to: officeui@microsoft. com

demo All Singing and Dancing Ribbon Demo. Rx

Infopath 2007

Info. Path Form Template Design Declarative design surface New features Import existing Word/Excel forms into Info. Path 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

Template Parts and Logic Inspector Template Parts Allow Re-use of parts across multiple forms Multiple developers to work in parallel Support all form features except code Formatting & control properties; data connections; rules, validation, conditional formatting, calculations Logic Inspector Inspect and debug the form thru a single, read-only view of all your form logic Rules, calculations, validation, events Caveat: conditional formatting not reported

Co de Info. Path Business Logic C# VB. NET Sc he ma De cla ra tiv e Rules Formulas Data Validation Data Connections Conditional Formatting XSD, Web Service, Database Most Form Development Does Not Need Code

Template Parts and Logic Inspector

Design Once Overview One form for rich client and browser Shared features Controls Business Logic Data Connections Digital Signatures Managed Code Object Model Design Checker: rich client-only features A pure subset of Info. Path features is available for browser-enabled forms Compatibility errors and warnings can be seen in the Designer or on the server during the publish step Smart Invocation Open in rich client, if available. - Links in document libraries, Web pages, email, etc. Special URL parameters to force opening in browser

Mobile Browser Forms Browser forms in a mobile device Scenario: Warehouse employees Form rendering optimized for mobile devices Fine Print Operating system and browser neutral Device must support HTML, x. HTML, or c. HTML

Office “ 12” servers XSN, XML loaded Business logic execution Publish XSN Replay event log Info. Path Designer ASPX Generate XSN Download XSN, XML Forms Capabilities Publishing, Opening, and Filling WSS Download script Return and updated data array Postback event log via XMLHTTP Take offline as needed XSN, XML loaded Business logic execution Rendering Validation Execute calculations Execute rules Editing actions Info. Path Client Browser Generate and render HTML (using script) Validation Execute calculations Execute rules Editing actions (All using script)

Design Once for Rich and Browser Forms

Visual Studio Integration Write Code in Your Favorite IDE 1. Visual Studio Tools for Applications (VSTA) Out of the box development Lowers the bar forms with managed code Compatible with Visual Studio Tools for Office 2. Visual Studio Tools for Office (VSTO) Embedded designer for professional devs One IDE for all your projects: workflow, etc. Integrated toolbox, project wizard, etc.

Integrating Forms Into Web Sites Build custom UI, provide additional functionality on the page 1. Add a link with query params to open form in its own browser window 2. 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 Info. Path Forms Services is available

Windows Forms & Active. X Control Host Info. Path Forms in Your App Managed and unmanaged Info. Path control Examples: Property editor in an Office app (Word, Excel, Powerpoint) Workflow dialogs Custom app for specific tasks that also hosts forms Automate OM and events for host/control interaction IOLECommand. Target for full control of editing actions Caveats Active. X will not load in browsers (security) No ink entry, Information Rights Management

Integrating Info. Path Browser Forms in a Windows Applications

Sharepoint 2007 and Workflow

Office Workflow Vision Facilitate human processes by attaching business logic to items and documents in Windows Share. Point Services, while providing context and tracking progress Empower information workers using Office Server with out-of-the-box solutions and self-service tools to support a broad range of routing and tracking scenarios without IT involvement Empower organizations to build a broad range of sophisticated workflow solutions that take advantage of the full functionality of the Windows Workflow Foundation (WF) platform and integrate into the Share. Point and Office experiences

Workflow Authoring Scenarios Visual Studio and Workflow SDK Share. Point Designer Workflow (with customization) Custom Tracking Apps Service Requests Asset Tracking Custom Form Actions Email Notification Exception Handling Document Processes Spec Review Weekly Status Report Tracking Applications Issue tracking Routing and Approval Review – Approval Signature collection East Asian workflow Office Server Features List Moderation Publishing Process Document Expiration Ad Hoc Out-of-the-Box Solutions Industry specific processes Purchase orders Product lifecycle mgmt Structured LOB Integration

Designing Workflows In Share. Point Designer

Windows Workflow Foundation Extensible framework and tools for building workflow into Windows applications Common workflow technology for Microsoft products, ISVs and customer solutions A framework to build on – not a server or application Key features Unified model for human and system workflow Extensible activity framework Allows workflows to run in any application or server Visual designer for graphical and code-based authoring Availability Included in Win. FX – powers Office “ 12” workflow

Windows Workflow Foundation Key Concepts Workflows are a set of activities Activities are the building blocks Workflows run within a Host Process: Any application or server Developers can build their own Custom Activity Libraries Components Base Activity Library: Out-of-box activities and base for custom activities Runtime Engine: Workflow execution and state management Runtime Services: Hosting flexibility and communication Visual Designer: Graphical and code-based construction Visual Designer A Workflow An Activity Custom Activity Library Windows Workflow Foundation Base Activity Library Runtime Engine Runtime Services Host Process

Designing Workflows In Visual Studio 2005

Agenda Office XML Formats Office Ribbon Extensibility Infopath Forms Sharepoint Workflow
- Slides: 48