Presentation is loading. Please wait.

Presentation is loading. Please wait.

OFC302 Building Smart Document Solutions in Word & Excel Martin Sawicki Lead Program Manager.

Similar presentations


Presentation on theme: "OFC302 Building Smart Document Solutions in Word & Excel Martin Sawicki Lead Program Manager."— Presentation transcript:

1 OFC302 Building Smart Document Solutions in Word & Excel Martin Sawicki Lead Program Manager

2 Agenda Demo: Smart Document in Action What are Smart Documents? Demo: XML Document Preparation Demo: Deployment Manifest Demo: Business Logic Code Smart Document Security Useful hints and troubleshooting Goal: Learn how to make XML-powered Smart Document solutions in Office 2003

3 Smart Document in Action Martin Sawicki Lead Program Manager Authoring & Collaboration Svcs. demo demo

4 What are Smart Documents? The doc knows how to download the appropriate solution on-demand The doc interacts with the user in a helpful manner The doc is aware of the user’s context and provides relevant assistance The doc understands the business process it is part of (where to go next) The doc can tell when its contents are not valid This document is a Smart Document

5 Smart Document as a Deployment Mechanism On-demand installation of solutions No need for code in the document or template No need to install manually on each user’s machine (also: auto update) Associates solution components with individual documents or classes of documents based on XML namespaces Can install schemas, XSLTs, Smart Document Task Pane code, SmartTags, COM-Addins, templates, etc

6 Smart Document as a Solutions Platform Hide XML from the user, show user-friendly UI instead Programmable, interactive, XML context- driven task pane in Word and Excel COM (VB or C++) or.NET (VB.NET, C#)

7 Building Key Smart Document Components Document or Workbook XML Schema

8 XML Document Preparation Martin Sawicki Lead Program Manager Authoring & Collaboration Svcs. demo demo

9 “XML-ized” Document To get started, you need: Customer defined XML Schema (XSD) Word: Document marked up with XML from schema Learn more: OFC291, OFC303, OFC308 Excel: Workbook with schema mappings Learn more: OFC304, OFC305

10 Building Key Smart Document Components Document or Workbook XML Expansion Pack (Manifest) XML Schema

11 Deployment Manifest demo demo Martin Sawicki Lead Program Manager Authoring & Collaboration Svcs.

12 What is an XML Expansion Pack? (a.k.a. Manifest) XML file describing components of solution and their location Allows on-demand solution download and activation No MSI or other setup packaging needed Centralized solution maintenance

13 Schema Library The XML Namespace is very important Schema Library = central registry on user’s computer keeping track of links between XML namespaces and… XML schemas XSLT transforms Smart Doc solutions XML Namespace Schema Library Schema files (XSD) XSLT Transformations Smart Doc Solutions

14 Smart Documents and the Schema Library XML Expansion Packs (manifests) are a way to set up the user’s schema library (…Also, they are a way to write into other places in the registry, e.g. smart tags installation)

15 Building Key Smart Document Components Document or Workbook XML Expansion Pack (Manifest) XML Schema Other Files Compiled Task Pane Logic

16 Smart Doc Flow Diagram User opens document Manifest-driven components download/installation/update Business logic initialization/ Task pane description User Interaction Loop/ Task pane refresh

17 Business Logic Code demo demo Martin Sawicki Lead Program Manager Authoring & Collaboration Svcs.

18 Business Logic Details Task Pane Initialization 1. How many XML types supported by solution? 2. For each XML type: a. Describe it (caption, element name) b. How many controls? c. For each control: a. What is it? (Button? Checkbox? Radio group? Doc fragment thumbnail? Help text? etc) b. Specify initial contents

19 Business Logic Details Task Pane Refresh 1. Solution code called whenever: User’s XML selection context changes User clicks control in task pane 2. For each XML type in current context: a. For each control: a. Modify caption, value, state… b. Modify contents

20 Smart Document Security XML Expansion Packs (Manifest files) Policy-controllable settings Manifest must be signed XML signing tool in Office SDKs Manifest signature must be trusted Manifest must be from trusted site User warned before download and use of solution

21 Smart Document Security Executable code Downloadable code subject to Office security settings DLL signing.Net Assembly security XSLTs must be signed to run script

22 Documentation Smart Document SDK Detailed documentation Samples Tutorials Schemas Available soon after release of Office 2003 (beta versions available for the betas)

23 Useful Hints… Syntax of XML type name: # E.g: financial-report#Date Special XML type names: To display task pane content when outside root element: #actionPertainsToEntireSchema E.g: financial-schema#actionPertainsToEntireSchema To display task pane content regardless of XML schema namespace: http://schemas.microsoft.com/office/smartdocuments/2003# default … and specify actionHandler as file type in the manifest (not solutionActionHandler)

24 More Useful Hints… When installed on user’s machine, smart document associations with XML namespaces are in the registry [HKCU|HKLM]\Software\Microsoft\SchemaLibrary The document’s reference to its XML expansion pack is stored in Custom Properties: Solution ID – id of the solution Solution URL – location of the manifest

25 Troubleshooting Manifests Make sure the file paths in the manifest are correct Make sure the manifest is valid (manifest schema to be available in the SDK) Make sure the manifest is signed and the signature is trusted Check you smart doc hasn’t been automatically disabled as a result of previous crashing (Word’s self-defense) under: HKEY_CURRENT_USER\Software\Microsoft\Office\Common\ SmartTag\Actions\ under Word (OpusApp) and XL (XLMain) Values: Crash = 2, Enabled = 1, Disabled = 0 If managed, then make sure your managed key is 1 not 0 at HKEY_CURRENT_USER\Software\Microsoft\Office\Common\ SmartTag\Actions\

26 Community Resources http://www.microsoft.com/communities/default.mspx Most Valuable Professional (MVP) http://www.mvp.support.microsoft.com/ Newsgroups Converse online with Microsoft Newsgroups, including Worldwide http://www.microsoft.com/communities/newsgroups/default.mspx User Groups Meet and learn with your peers http://www.microsoft.com/communities/usergroups/default.mspx

27 evaluations evaluations

28 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.


Download ppt "OFC302 Building Smart Document Solutions in Word & Excel Martin Sawicki Lead Program Manager."

Similar presentations


Ads by Google