This documentation is archived and is not being maintained.

Microsoft Office 2003 Editions: Overview of Developer Technologies

Office 2003

Microsoft Corporation

October 2003

Applies to:
    Microsoft® Office System

Summary: Evaluate the new features in the Microsoft Office System and the type of powerful, intelligent, and connected solutions you can create with it. (21 printed pages)


The Microsoft Office 2003 Solutions Platform
What's New for Developers?
Connected Applications
Integrating Web Services with Office 2003
Creating Intelligent Applications
Integrated, Innovative Enterprise Developer Tools


This overview of developer technologies describes the innovations in the Microsoft® Office System, previously code named "Office 11", which enable solution developers to build custom Office applications that are powerful, intelligent and connected. The goal of this document is to allow developers who incorporate the Microsoft Office System within custom solutions to evaluate new features in the Microsoft Office System and the types of solution they can create with it.


The Microsoft Office System allows developers to efficiently build powerful, intuitive applications that provide information workers with rapidly delivered solutions within a familiar and powerful user interface.

The Microsoft Office System offer the following development features:

  • Connected applications. Enables developers to build applications that use Extensible Markup Language (XML) and Web services to allow Office end-users to easily interact with enterprise-wide business processes and data. With the Microsoft Office System, the XML support in Microsoft Office Excel 2003 and Microsoft Office Access 2003 is expanded and XML support is added to Microsoft Office Word 2003. In addition, developers now can easily integrate Web services across all Office applications.
  • Intelligent applications. Using the "smart" client capabilities and the new, powerful interface in Office, enables developers to create applications that allow people to efficiently work the way they want with the information they need. Smart documents in Word 2003 and Excel 2003 provide a powerful new way to create solutions that interact and guide the user, and the popular smart tags feature has been enhanced to enable developers to create even more powerful interfaces that improve user productivity.
  • Innovative enterprise developer tools. Allows developers to use and expand their existing developer skills by using innovative and reliable tools for robust solution development. Integration with Microsoft Visual Studio® using the Microsoft Visual Studio Tools for the Microsoft Office System allows the developer to bring the power of writing managed code in Visual Studio .NET into Office applications.

The Solutions Platform for the Microsoft Office System

Microsoft Office has a reputation as a business productivity application suite that empowers users to be highly efficient, knowledgeable and collaborative. Developers widely accept that targeting Office as a solutions platform means they can use the vast experience of productive information workers to offer custom applications that are familiar, consistent and easy to use. As a result, Microsoft Office becomes a solutions platform that offers a host of benefits not only to users and developers, but to entire organizations and beyond.

Knowledgeability and Familiarity

In learning to use new software applications, users often must contend with a daunting learning curve, the resistance that commonly accompanies that curve, and a general loss of productivity while they acquaint themselves with new tools. With solutions delivered in Microsoft Office, these problems are avoided because users are already experienced and comfortable with Office applications. This enables developers to create business applications that neatly blend into existing work environments and that require minimal ramp-up time.

Developers building upon the Office solutions platform can therefore expect quicker acceptance and higher productivity from users, as well as reduced training and support needs. Developers themselves derive similar benefits because of their own familiarity with Office. First, as end users of the product, they can draw from their own mastery of Office. Second, as developers, they can apply their knowledge of industry-leading technologies, such as Microsoft Visual Basic® and XML, to build Office solutions quickly and efficiently.

Effectiveness and Efficiency

Solutions that directly match business needs rarely come without costs. In today's business climate, the ability to control those costs is extremely important. The Office solutions platform can help businesses meet specific needs without straining budget resources. By using the Office architecture of reusable components and supporting infrastructure, developers spend less time in the development process, and users spend more time helping their organization to improve revenues or reduce expenses with the new solutions.

One example would be of a company trying to implement a business intelligence application to perform market analysis. The company could create a standalone application and develop a custom interface that includes a charting engine and an advanced data querying tool. Or, the company could simply build on thoroughly tested and documented components, such as chart and PivotTable® features in Excel, and create a customized Microsoft Office solution.

Bottom Line

In the end, what really matters is that the Microsoft Office System is a fully extensible, highly efficient and very effective solutions platform for building custom applications that offer immediate return on investment. End users are comfortable, developers are productive, and business problems are easily solved. With the Microsoft Office System, Microsoft carries the vision even further so that developers can have more impact on the bottom line.

What's New for Developers?

The Microsoft Office System offers developers a solutions platform capable of producing a new breed of applications that help increase user productivity and improve business performance while using existing skills, infrastructure and investments. With the Microsoft Office System, developers can create the following:

  • Applications that incorporate open-industry-standard technologies enabling easy connectivity to external data, systems and processes.
  • Applications that surround users with intelligent, familiar interfaces geared toward directly solving their business needs.
  • Applications that can be quickly designed, developed, and deployed with productive and professional developer tools.

Connected Applications

One of the critical tasks developers face today is working with multiple systems and processes while incorporating differing data sources in varying formats. The Microsoft Office System lets developers build applications that flexibly connect with business processes and data using open-standard technologies. One of the key investments Microsoft made in the Microsoft Office System builds on the efforts started in Microsoft Office XP to use XML and Web services throughout the product. Developers building applications with the Microsoft Office System can use XML and Web services to allow users to easily interact with enterprise wide business processes and data, as well as with customers and vendors.

Unlocking Data with XML

A key factor in sharing business information and connecting applications across systems is the ability to communicate easily. Historically, Microsoft Office has been a solution of choice for users looking to create and consume information. With the Microsoft Office System, the sharing of information between documents, databases and other applications is simplified through support for XML. Users can freely contribute their thoughts and ideas, and developers do not have to worry about how they are going to process that information. Simply put, Office content becomes free-flowing, unlocked data through the use of XML.

With the Microsoft Office System, XML is a first-class file format in Word 2003 and Excel 2003, and can be imported and exported in Microsoft Office Access 2003 using XML Schema Definition (XSD), either specified or implied. Although many XML enhancements are made through the different applications' user interfaces, developers also have full access to Office XML features through complete object model support. A later section of this document reviews specific product support for XML, according to application.

Using Business Data in Users' Own Format

All data has meaning within the context of a business. The Microsoft Office System introduces support for using customer-defined XML schemas in Word 2003 and Excel 2003, which allows users to manipulate and present data in the format that fits a specific business need. For example, using an XML format for data might make sense for the specific process being improved or for the enterprise data source being accessed, rather than complying with a format that a specific application can understand. The ability to use business-defined XML schema enables more flexible connections to back-end data and easier translations of the data for a customized presentation.

In the Microsoft Office System, developers visually map data elements within the context of Word 2003 and Excel 2003 documents through newly designed, intuitive user interfaces that represent the underlying XML schemas attached to a document. Once developers have mapped data to a document, they can focus on creating their own rich user interfaces and add business logic without having to worry about programmatically manipulating data, protecting the structure of the document or schema, and validating content.

Easily Connecting to Business Systems and Processes

Because XML is becoming a widespread, industry-standard format for data shared across disparate systems, the Microsoft Office System enables information workers and business documents to be flexibly connected to corporate data sources for retrieving or submitting data. Integration can easily occur through a Web service or any application that supports an XML interface, such as Microsoft BizTalk® Server or Microsoft SQL Server 2000. Interoperability with other applications minimizes coding and data translation, and it allows users to get more out of their existing software investments by enabling them to more easily reach and manipulate data from within Office applications.

XML interfaces built into popular products such as SQL Server 2000 and BizTalk Server make it easier for Word 2003 and Excel 2003 based applications to interact with corporate data and business processes by using inherent support for customer-defined XML schemas. Enhanced interoperability of documents, calendar, and e-mail with Microsoft SharePoint™ Products and Technologies allows powerful collaboration applications to be created more quickly.

Extending the Microsoft Office System with XML

XML in the Microsoft Office System opens up possibilities for developers to build powerful solutions that include the following:

  • Structured Word documents that capture information from users as they enjoy all the rich editing features that they expect, including spell check, change-tracking, AutoCorrect and more
  • Spreadsheets that are able to "round-trip" data with other sources which incorporate analytics only business users can provide through knowledge of Excel
  • Database applications delivered through accelerated development cycles by using the power of Access, now able to exchange data freely between sources

XML changes the rules for Office developers by removing any of the obstacles that stemmed from data being locked in binary files.

Unlocking Word with XML

XML in Word 2003 is a monumental breakthrough for the Microsoft Office System. Data that was once hard to separate from free-flowing documents is now easily manipulated. For starters, Word includes a native XML file format that fully represents a Word 2003 document, and fully round-trips without the loss of formatting. As a result, developers can easily detach presentation data without having to worry about hindering the experience for users. With XML, Word solutions can take on many new forms:

  • As an XML editor for customer-defined schemas
  • As a content management and repurposing tool
  • As a structured data editing tool
  • As a data reporting tool

As an XML Editor for Customer-Defined Schemas

Word enables native editing of XML documents whether they adhere to a specific defined schema or not. Word infers schemas for documents that do not correspond to a designated schema to allow them to be viewed, edited and saved as XML. More important, Word supports XML documents that adhere to XSD, that is, documents that need to represent the structure of business data. Developers apply XML elements to documents at design time (or even run time) based on the underlying, attached schemas. This enables structure to be provided and validation to be enforced between data and document. The document is effectively marked with visual tags that reveal locations of the XML elements, as seen in Figure 1. The developer can toggle between the tagged view and normal view to compare the structure against the intended output while editing the document.

Click here to see larger image

Figure 1. Customer-defined XML in Word (click picture to enlarge image)

Word uses a task pane user interface (UI) to display the structure of the XML, which is derived from the schema applied to the document. Task pane updates show only elements that can be applied to the current selection as the document is being edited. Any schema violations that occur during editing are shown to the developer in real time with visual cues along with a description of the problem.

Documents that use a customer-defined schema can be saved as data-only XML according to the schema's structure. Conversely, documents can be saved using the full Word XML (WordML) schema, providing additional value to developers by maintaining formatting and other Word features such as document properties, revision history and tracked changes. WordML can be transformed afterward to separate the pure XML data as required, but also allows developers to reveal Word-specific content. For example, WordML output could be transformed to populate an ASP Web page with revision history of documents. For ease of use and reference, XML markup conveniently persists in binary DOC and DOT files as well as the XML file, for ease of use and reference.

Word as a Content Management and Repurposing Tool

Word 2003 offers key functionality that makes it a useful component of a content management solution. While users work in the familiar surroundings of Word, developers can manipulate, distribute and repurpose the content as needed, using tools such as Visual Basic for Applications (VBA) and the robust WordXML object model.

Content management systems depend upon the ability to control the ultimate format of output. With Word, developers can set up a template or document with specific styles, give users to access to only the desired styles, and even disable direct formatting on the document. This allows complex documents to be edited by many people and still retain structured formatting.

Word allows developers to attach an XSD file manually or to apply a selected Extensible Stylesheet Language Transformation (XSLT) to an existing XML file without user or developer intervention. Word can track associations and allows users to automatically apply the appropriate XSDs or XSLTs when it comes across XML files that belong in certain categories such as news articles versus performance reviews. Solutions that use this functionality allow users to simply open an XML file; Word automatically applies an XSLT to display it and attaches the XSD file to help enforce the validity of the XML file during editing. In addition, Word allows developers to manually manage schemas as necessary through a new feature called the Schema Library (shown in Figure 2), where they can apply friendly names or aliases to member schemas to make them easy to identify.


Figure 2. XML Schema Library user interface

Word as a Structured Data Editing Tool

Word allows a document to be protected against editing by some or all users. In the Microsoft Office System, Word adds the capability to mark desired regions as fully editable by some or all users, such as in a form. Combined with schema validation, developers can use Word as a data input tool for the client-side portion of XML-based business processes. When the user is finished editing, developers can submit the resulting document to a Web service or internal server tool with certainty that data output is pure, valid, well-formed XML.

Word as a Data Reporting Tool

Word 2003 introduces refreshable XML Web queries, the results of which developers can pass through a transform for display in Word using rich formatting capabilities. The results of the query can be pure numeric or other data from a database or even portions of Word XML, such as fragments of documents located on a server or content database.

Excel and XML

Excel 2003 improves upon XML support with the Microsoft Office System. As with Word, Excel now supports the use of customer-defined XML. Developers can create applications that are based on business-relevant XML definitions and are no longer limited to using the native XML Spreadsheet Schema (XMLSS), as was the case in Office XP. So, instead of writing cumbersome XSLT files to transform XML data to and from XMLSS, developers can easily attach their own schema and interchange data with Excel. Some scenarios that Excel XML enables follow:

  • As an XML editor for customer-defined schemas
  • As an analytic content provider
  • As an automated XML data viewer
  • As an interactive data reporting tool

Excel 2003 as an XML Editor for Customer-Defined Schemas

In the Microsoft Office System, Excel joins Word in providing the ability to support customer-defined XML. Excel enables solutions that use any XML schema to be mapped within the structure of a spreadsheet. Excel provides a visual data mapping tool similar to that in Word (as shown in Figure 3). This tool allows developers to see the XML structure in the task pane and quickly create a structured spreadsheet document.

Click here to see larger image

Figure 3. Customer-defined XML mapping in Excel (click picture to see larger image)

Unlike the visual tags that surround the XML elements inline in a Word document, mapped elements in Excel are designated with blue, nonprinting cell borders. Logically recurring XML patterns get integrated within a new end-user feature in the Microsoft Office System called Excel Lists. With Excel Lists, Microsoft introduces database-like functionality to the spreadsheet. Although geared toward end-user scenarios, Excel Lists are fully exposed programmatically through the object model for use by developers. Excel Lists also offer direct Read/Write connectivity to lists in SharePoint sites.

Developers can apply XML schemas to a new workbook or use existing ones as appropriate; for advanced spreadsheet models that require the support of various data structures simultaneously, Excel workbooks support the mapping of multiple XSD schemas.

Excel as an Analytic Content Provider

One of the traditional uses of Excel has been to capture input from knowledgeable users. A developer builds a spreadsheet, and then sends it out to users who fill in data and return the spreadsheet to complete the process. Common scenarios include budgeting applications, expense reporting, project planning and even arbitrary data list consolidation. These spreadsheet scenarios are highly beneficial to users, but have traditionally been difficult for developers to implement. The XML functionality in Excel solves many of these common issues.

Developers can extend Excel-based solutions by using XML to deliver and recollect data. Web services provide an easy method of transport for XML, which offers an optimal vehicle. Users can still import and export XML through the UI but, more important, developers have full programmatic control to unlock data from workbooks. Excel allows XML to be validated against the schema, guaranteeing that results come back from users in the format required.

Excel as an Automated XML Data Viewer

Users are generally very comfortable using Excel to view data. Developers can target Excel for solutions capable of delivering XML-based data. Business intelligence, analytics, charting and other solutions can benefit from the ease of and openness to consuming XML in Excel.

One interesting scenario for developers is to turn Excel into a data viewer for any data source. Using the XML Web Query feature, developers can add links from spreadsheets to XML data sources without writing code. Developers can set XML Web queries to update automatically, support format and formulas within a worksheet, and then integrate with XML mapping and list features in Excel.

In the Microsoft Office System, a developer can build a worksheet to include the format, formulas and layout that support a business need, and point it at an XML source to provide users with the latest available content. Users get the rich Excel environment they are used to, and developers get fast results.

Excel as an Interactive Data Reporting Tool

Developers commonly receive user requests to make data available inside of Excel so users can provide their own ad hoc analysis, which is something that can't be done natively with browser applications. As investments in delivering Web services and XML start to become realities, developers can provide users with the data in Excel and easily map that data into workbooks regardless of incoming structure. Excel includes an add-in for working with Extensible Business Reporting Language (XBRL) data, an XML hybrid that structures corporate financial reporting data, so developers can build financial models with XML.

Access XML

Access 2003 sheds the Access-specific schema required in Access 2002 in favor of the latest XSD standard format for XML data exchange with external data sources. Developers can import and export with greater flexibility by using their own XSL transforms to import or export Access data.

Importing data into Access does not require an XSD. If there is no XSD, Access infers a structure from the incoming data. If the imported XML data includes an accompanying XSD schema, Access recognizes defined data types based on the schema definition.


Figure 4. Import XML options UI in Access

Access offers more options for greater flexibility in exporting XML. Using Microsoft XML Core Services (MSXML) 5, XSLT files can be created upon export to present XML content. Support for exporting XML with respect to current Filter and Sort views also is included. Another major breakthrough in Access XML support is the ability to export related tables automatically within the export process. This way, data in tables related to those being exported, such as look-up data tables, will not be missed accidentally in the export process.

As users expect with Access, all support for XML available from the user interface also is available programmatically. There have been enhancements to the XML Object Model, including a new TransformXML method and additional parameters for the ExportXML method.

Integrating Web Services with the Microsoft Office System

The Microsoft Office System takes application connectivity further than ever before by enabling support for Web services using the Microsoft Office 2003 Web Services Toolkit. This makes it easier for developers to expose data from legacy systems. Developers can now expose data that was previously locked within business applications to authorized users around the company who, until now, had no simple way of accessing it. Developers can easily locate and integrate data from outside an organization and incorporate it into solutions without ever leaving the Office development environment. Best of all, the Microsoft Office System allows developers to connect with Web services without having to learn new languages or protocols; they simply apply the skills they already have.

Referencing Web Services from VBA

With the Office 2003 Web Services Toolkit installed, the Microsoft Office System adds new functionality that lets developers discover and integrate Web services without leaving the Office Visual Basic Editor (VBE). Through the Web Service References user interface (seen in Figure 5 below), developers can search—by keyword or business name—for Web services listed in corporate and/or public Universal Description, Discovery and Integration directories, and include them in their VBA project. Alternatively, developers can point directly at a known Web service's Web Services Description Language file to use with their project.

Click here to see larger image

Figure 5. Office Visual Basic Editor Web Service References user interface (click picture to enlarge image)

Once a Web service has been located by the search tool, the developer can review the methods offered by the service as well as any descriptive information provided about it. The developer even can run a test method page from the UI, if the Web service offers one, to ensure the service is optimal for the project.

To add a Web service reference to the VBA project, developers simply click Add. Office inserts proxy classes to the user's current VBA project that contains routines exposing the Web service's methods, performs error handling, manages the VBA class, and more. Developers can immediately start writing native VBA to include the Web service within the business logic. All in all, adding Web service references makes it simple for developers to build an entirely new class of connected applications.

Creating Intelligent Applications

In Office XP, Microsoft Corp. introduced an innovative concept called smart tags. With smart tag technology, developers can build solutions that intelligently recognized key data terms inside documents and mail messages, allowing users to perform custom actions associated with the specific data elements. The Microsoft Office System not only enhances smart tag functionality to allow the creation of even more powerful smart tags, but also extends the metaphor to enable document-level-based solutions called smart documents.

Smarter Interfaces

Developers implementing solutions with the Microsoft Office System can take advantage of smart tags and smart documents to build smarter, more intelligent solutions that incorporate business logic, react to how the user works, and respond to inputs and actions that have important meaning to the user. Intelligent solutions enable users to spend more time performing their true job function and less time trying to understand an application, searching for instruction or requiring support.

Smart tags let developers build contextual, on-demand interfaces that can link users to relevant corporate data, streamline cumbersome tasks, or perform any number of operations that tie back to the recognized data term. Smart tags in the Microsoft Office System are more configurable than smart tag in Office XP, so users can benefit from dynamic actions and context-specific task pane content.

Smart document technology in the Microsoft Office System enables the creation of XML-based applications that provide users with contextual content by using the Office task pane. Users become more productive with smart documents because content is presented in the task pane as they navigate through a document, reducing the time spent searching for or filling in data, or looking for help. Because they are flexible and programmable, task panes can present users with almost any supporting information, such as data that corresponds to the document, relative help content, calculation fields, hyperlinks or any number of controls.

Developers can design Word and Excel documents with an underlying XML structure that ensures users are entering and viewing valid information. At the same time, the XML structure enables developers to build the document with context-specific help and supporting information.

Introducing Smart Documents

Smart documents build on the concept of smart tags introduced in Office XP, and extend it using a document-based metaphor aimed at simplifying and enhancing the user experience of working with documents. With smart document technology, developers build upon rich XML-based documents in Word and Excel to create solutions that can be deployed and subsequently updated from a server, once the initial document or template has been opened on the client, making distribution a nonissue. Users benefit from a smart document's ability to deliver relevant information and actions through the use of an intuitive task pane that synchronizes content based on the user's current location within the document.

Benefits of Smart Document Solutions

Smart documents result in a new breed of smart-client solutions that developers can deliver to Office users. These solutions are based on users' familiarity working with Word and Excel documents, and combining distributed, Web-based computing and the use of open-standard technologies such as XML and Web services. The following are some advantages that smart document solutions offer developers:

  • Better document-based solutions. Smart documents allow developers to provide a better overall user experience than that of traditional Office document-based applications. Developers can create solutions that offer richer user interfaces, provide content that is relevant to the situation as users work within a document, and extend documents to seamlessly integrate with other processes and systems.
  • Programmable task pane. Smart documents offer a programmability model for task panes in the Microsoft Office System, allowing developers to provide appropriate content that has relevance within a solution. The task pane can be programmed to contain any variation of data, help, common controls—such as buttons, check boxes, option buttons, and list boxes—hyperlinks, images and free text. Developers also can manage task pane events to perform actions on behalf of the user.
  • Simplified deployment and update mechanism. Smart document solutions are deployed using a new mechanism that enables installation by simply opening a document that was obtained by using e-mail or downloaded from a Web or file server. Smart documents also can automatically update themselves from any trusted server location, making upgrades a nonissue. Developers never have to install or manage the client-side code directly.
  • Higher security standards. Smart document solutions implement a high standard of security that requires full trust. Downloaded solutions are subject to Office security settings, can come only from trusted sites, and are required to be signed by a previously trusted signer. If these requirements are met, the user is still prompted to decide whether or not to initiate the download and use a smart document solution. If not, nothing is executed on a user's computer.
  • XML support. The XML support in Word and Excel documents enables smart documents, which make use of XML. Developers can easily use existing XML tools, data sources and their own XML skills to build robust smart document solutions.

Using Smart Documents

Smart documents enhance business processes ranging from those intended simply to ensure users are working on the latest copy of a document to fully functional, interactive processes that provide guidance, instruction, data and formatted content delivered by using the task pane and corresponding actions. Smart document scenarios can include such varying tasks as enabling an expense report in Excel, producing a sales proposal generator and managing a legal compliance form process in Word.

A better understanding of how smart documents enhance the user experience can be derived from the following scenario. Before smart documents, users who needed to fill out an expense report started with the latest spreadsheet file. If they didn't already have it, they navigated to an intranet page or file share, or use a copy that was sent in e-mail to them or already existed on their computer. If users already had a copy, it was their responsibility to ensure it was the most recent copy before continuing; this also required that they check the usual places. Once users located the current document, they filled it out using the on-sheet instructions provided, perhaps in cells on the side or as in-cell comments. Next, users submitted the document for approval, which might entail saving the document back to a file share or sending it in e-mail directly to a supervisor.

Smart documents make processing such reports easier and more efficient while eliminating mistakes and confusion. In a smart document solution, the users still get the expense template initially, but they must retrieve it only once since the solution includes information about how to update itself. This way, if the company ever changes the format or logic associated with the expense report solution, users need only open the existing version, and the smart document maintains the latest functionality. Filling out the expense report also is simpler and more intuitive. As users add information, the task pane automatically updates to offer relevant content that may be instructional or functional. For example, if users type expense information into a cell that requires it to be classified by type, the task pane can explain each expense category type and what kind of expenses are applicable to each, and offer to insert one automatically. In another example, when users type an expense amount and specify that it was not in a local currency, the task pane displays current currency exchange rates by using a Web service to ensure precise accounting and streamline calculation. Another feature might help users calculate driving expenses by including mileage calculator that uses a point-to-point mapping Web service.

Click here to see larger image

Figure 6. A smart document in Word (click picture to enlarge image)

When users complete their form, they click Submit in the task pane. The smart document first validates the report and then routes the complying document directly to the appropriate supervisor. After a report is submitted, the Submit button on the user copy is grayed out, and the report is marked submitted. The supervisor's copy offers the choice of clicking Approve Expense Report or Deny Expense Report. If the supervisor clicks Approve Expense Report, a confirmation e-mail is sent automatically to the user, and the expense report data is submitted to the expense report processing service. If the report was denied, the expense report with the supervisor's comments is automatically routed back to the user. The entire process is performed and managed with logic contained within the smart document solution.

Building smart documents

Developers can use an existing document or start from scratch to build a smart document solution. The document must be attached to an underlying XML schema, which is then used as the basis for marking it with corresponding XML elements. Once the document is prepared, developers use the smart documents API to build the automation that drives the solution. The code developers write manipulates the document directly or interact with server-side processes, such as retrieving data or routing the document (or its contents) to a back-end system to complete the solution.

The API for creating smart documents is very similar to the smart tags API on which it is based. Developers can reference the API with the language of their choice; they aren't limited to Visual Basic. You can even build smart documents under managed code using the Microsoft Common Language Runtime (CLR) and Microsoft Visual Studio .NET. Although smart documents and the code behind them are closely related, they exist independently of each other, can be versioned separately, and can benefit from reusing other common components beyond the project.

An XML file called a manifest is one of the final building blocks of a smart document solution and an important one. The manifest connects the Word or Excel document template, which users access initially, to all the supporting files (such as DLL, XSD or XSL) associated with a smart document solution. The developer simply needs to create the manifest file and place it with the solution's supporting files on the server. When a smart document is opened by a user, the manifest technology in Office checks the document's internal metadata (specified in the Custom Properties tab of the Properties dialog box when the solution is created) to locate and inspect the assigned manifest thus ensuring that the entire solution is available and operational, and that any new or obsolete files are downloaded as needed. This dramatically simplifies deployment and maintenance for the solution developer.

Smarter Smart Tags

Introduced as a new feature in Office XP, the Microsoft Office System improves smart tags based on feedback from users and developers. Smart tags offer users more flexibility since developers can implement new scenarios that target more of Office's features.

Within the Microsoft Office System, smart tags are available not only in Word, Excel and Microsoft Office Outlook® 2003 when using Word as the e-mail editor, but also in Access and Microsoft Office PowerPoint® 2003. In the Microsoft Office System smart tags are used in the following applications:

  • Access
  • Excel
  • PowerPoint
  • Word
  • Outlook , task panes and SharePoint (for people's names)
  • Research Task Pane (across Office)
  • Microsoft Internet Explorer (recognizable with tool from SDK)

Smart tags also are enhanced for users and developers. Users now can choose to enable or disable the smart tag button and user interface button for individual smart tags. Object model support has been extended to provide developers with more flexibility from VBA. Distributing smart tags also has been improved so developers can deploy them at a computer level; in Office XP, they could only be registered at an individual (current user) level on a given computer. Some of the more notable improvements to smart tags in the Microsoft Office System are described below.

Recognizers and Actions Reloading Without Restarting the Host Application

In Office XP, smart tag recognizers and actions are loaded only when the application is initially started. In the Microsoft Office System, smart tags can be reloaded without having to close and reopen the host application, which makes them more accessible and convenient for users. Now, newly downloaded smart tag actions are immediately available, and dynamically updating smart tags works as designed without requiring a restart. This feature also benefit developers who are in the build/debugging process of smart tags, increasing developer productivity.

Dynamic Smart Tag Action Menus

Developers can alter smart tag action menus now at run time. This introduces many new scenarios for developers, enabling them to build smart tags capable of dynamic menu captions or even eliminate menu items altogether. In the case of changing the menu caption, developers can produce more useful action menus based on the situation to give users a better experience. Previously, a smart tag action menu may have offered users the opportunity to "buy this DVD now." Now the same action can provide richer, more timely information with greater detail, such as "buy this DVD on sale for $19.99 until June 5," which would be programmatically derived at run time.

With dynamic action menus, developers can provide actions that are used solely for information purposes. A simple example of how this could be used is a stock ticker smart tag with an associated action that provides price quotes. Instead of a having a menu caption that reads "stock quote on MyStockSite" with an action that leads users away from the current document to view a Web page, a dynamic action menu could be used to provide the information immediately: "stock quote on MyStockSite ($13.75, up 0.125)."

In some scenarios, it might make sense not to display a specific action menu. Developers can suppress inappropriate action menus as the situation requires. Examples include suppressing an action menu that says "buy now" for a product that has been discontinued, or one that says "schedule a meeting" for a date that has passed.

Cascading Menus

Another useful new feature involving smart tag action menus is the ability to create cascading menus. Developers can logically group actions by hierarchy to make it easier for users to find related actions, shorten the overall menu length, or simply consolidate actions under one heading so they are separated from other action handlers.


Figure 7. Cascading Smart Tag Action Menu

Tokenizer Built in to Smart Tag Infrastructure

Smart tags in the Microsoft Office System include a built-in tokenization feature, which breaks down strings, punctuation and white space into actual words for use by the recognizer. Now, developers implementing the smart tag API do not have to tokenize the text. They can focus on deriving their recognizer term lists and custom actions instead of writing code to parse the text. Tokenization is very useful for developers who write smart tags that need to support multiple languages because developers no longer need to write language-specific code to do so.

Pattern Matching Without Writing Code

Developers can use smart tag functionality without writing a single line of code. Although with Office XP developers could create a Microsoft Office Smart Tag Lists (MOSTL) XML file, the Microsoft Office System introduces pattern matching to make codeless smart tags more powerful and useful. A developer comfortable writing regular expressions (using a slightly modified Perl regular expression syntax) can create a MOSTL file that implements a regular expression capable of recognizing terms that reoccur predictably. For example, recognizing a part number where the string always begins with Part Num but ends in a sequence of numbers can be done using MOSTL and regular expressions, without having to type every possible part number in the XML file.

New Types of Smart Tags

Following are new types of smart tags developers can implement in Office 2003 that offer varying life spans and scope in the recognition of terms:

  • Expiring. Smart tags can have a set life span, designated by the developer to stop recognition after a specified date and time. Expiring tags are useful in situations in which their usage is no longer of value after a certain date or time, which saves developers maintenance and cleanup time. For example, a smart tag that links to an online coupon can be set to expire when the coupon is no longer valid, ensuring that users don't waste time or aren't misled.
  • Unsavable. Some smart tags are not appropriate to save with a document. Tags marked as unsavable allow developers to ensure that sensitive information, such as client names or HR data, will not be accidentally transferred outside a department or organization by using a document.
  • Fragile. Developers creating recognizers for smart tags can avoid unwanted recognition. In the past, smart tags that recognized client names ran the risk of misinterpreting the user's intent if similar client names were entered, e.g., Smith Auto and Smith Auto Body. In this scenario, if the user paused after typing Smith Auto, the recognizer would fire off the discovery of a real client, but when the user finished the term Smith Auto Body, the original recognition would persist and not represent the actual context. In Office 2003, this can be avoided by setting the fragile property on a smart tag, allowing it to stop recognizing whenever the user types in the paragraph, not just in the middle of the smart tag itself.

Research Library Extensibility

Common to all applications in the Microsoft Office System, a new task pane called the Research Library enables user-initiated searches across local and remote data sources, both behind a corporate firewall and on the Internet, and may include sites based on Microsoft SharePoint Products and Technologies as well. Its primary offering starts with basic resources such as Thesaurus and Dictionary in multiple languages, bilingual dictionaries, computer translation, encyclopedia, and Web searching.

The research library, which can be controlled by administrators at a corporate level, can be extended by developers and third-party information providers to make business-specific data available to users. The research library's task pane can be customized to house smart tags, hyperlinks and textual data, which also can be inserted into Office applications as structured XML data, which isn't the case with typical Web searches. One interesting note about research library extensibility is that, unlike many customization scenarios in Office, which are typically delivered at the document or application level, extending the research library allows developers to provide an intelligence solution that permeates across the Microsoft Office System.

Integrated, Innovative Enterprise Developer Tools

Microsoft has a long history of innovation with regard to delivering tools for developers to build custom solutions that extend Office. As past investments such as VBA helped to make developers more productive, the Microsoft Office System continues to focus on creating a leading-edge solutions platform for professional developers of all levels and skills. The Microsoft Office System exposes new interfaces, extends support for open standard technologies, and allows developers to make choices with regard to tool sets, languages and application architectures.

Improved Solution Deployment

With the Microsoft Office System developers can create solutions that can be deployed, managed and updated from a server. This facilitates changing or enhancing the functionality of applications, as well as the access privilege of individuals, without having to touch the desktop. For example, the new smart document technology enables application scenarios in which developers can deploy rich XML-based Word and Excel solutions and subsequently update these solutions from a server once the initial document or template is opened on the client. Likewise, another new technology implemented in the Microsoft Office System, Microsoft Visual Studio .NET Tools for the Microsoft Office System, offers developers a simplified distribution mechanism by using the Microsoft .NET Framework.

Server-based deployments improve the security of desktop applications by managing more of the application and data access privileges from a centralized server within a trusted zone. Managed assemblies and code for smart documents and smart tags follow robust .NET security protocols.

Integration with Visual Studio .NET

Visual Studio .NET Tools for Office brings together the richness of building Office solutions and the power of writing managed code in Visual Studio .NET. Developers now can take advantage of writing .NET code that executes behind Word and Excel documents; previously they could only write in VBA. Developers get the full, robust advantages of the Visual Studio .NET environment while creating code that automates the Microsoft Office System.

Using managed code with the Microsoft Office System allows developers to create applications with a more robust security model, restricting code that can execute only on a fully trusted corporate server. This also simplifies deployment, saving time and money, by not requiring the application rollout to manually install code on each desktop.

Code behind .NET projects can be started in .NET with new Office documents, applied to existing Excel spreadsheets or Word documents and templates, and even co-exist with current VBA-based logic. This is particularly helpful in allowing a staged, cost-effective migration of solutions over the .NET Framework.

Developers using Visual Studio .NET can derive many coding benefits, such as language freedom, easier debugging, better memory management, and a more robust security model. In addition, an approved primary interop assembly for the Office object model allows developers to concentrate on creating an application with Visual Studio instead of spending time writing "bridging" code to connect to the COM-based Office object model.

Click here to see larger image

Figure 8. Creating an Office 2003 project in Visual Studio .NET (click picture to enlarge image)


The Microsoft Office System offers developers the latest innovations for delivering rich solutions targeted at one of the world's most popular software programs. Through the use of XML and Web services, the Microsoft Office System is a highly connected platform to share data between applications, among processes, across enterprises and beyond. With intelligent and extensible technologies including smart documents, smart tags, programmable task panes and a suite-wide research library, the Microsoft Office System continues to equip developers to build applications for any audience of users that satisfy a wide range of business needs.

Finally, the Microsoft Office System offers developers a professional development environment that builds on their knowledge and skills; simplifies deployment and management; and provides rich functionality, options and choices. The Microsoft Office System offers innovative tools for building intelligent business applications.