The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Overview of Office 2003 Developer Technologies

Office 2003

Microsoft Corporation

Published October 2004
Revised December 2005

Applies to:
    Microsoft Office 2003 Editions
    Microsoft Visual Studio 2005 Tools for the Microsoft Office System

Summary: One of two articles, this overview of developer technologies describes the technologies that help enable solution developers to build custom solutions incorporating programs from Microsoft Office 2003 Editions. Read this article to understand the development technologies for Office 2003 Editions and the types of solutions you can create with them. (38 printed pages)


Solution Development for Microsoft Office 2003 Editions
Solution Guidance
Additional Resources

Solution Development for Microsoft Office 2003 Editions

This is one of a two part series that reviews tools and technologies for use when developing custom solutions that take advantage of Office 2003 Editions. For more information, see Overview of Office 2003 Developer Tools and Programs.

Microsoft Office 2003 Editions preserves all the development capabilities that existed in previous versions, giving you the comfort of knowing you can always rely on your existing base of knowledge while learning new solution techniques. The solutions that you can create continue to use the familiar and consistent user interface (UI) that current Office users know, thereby minimizing training.

You can loosely group the investment areas for Office 2003 Editions into the following three areas.

  • Simplifying creation of connected systems. Office 2003 Editions enables you to build solutions that use Extensible Markup Language (XML) and Web services to allow users using Office to interact easily with enterprise-wide business processes and data. These solutions can help improve the flow of information, efficiency of handling documents, and quality of decision making throughout an organization.
  • Furthering the robust foundation of Office functionality. The solid base of Office technology is significantly enhanced through improving existing technologies and innovating with new technologies. This investment helps you employ proven and specialized software and technology in Office 2003 Editions, allowing you to build solid, extensible solutions rapidly, decreasing the time to market while retaining flexibility to meet changing business requirements.
  • Productive developer tools. This focus enables secure, robust solution development with efficient and friendly developer tools and software. Developers can implement solutions with their existing developer skills while also growing in new areas, for example, by increasingly adopting W3C standards and .NET Framework technologies.

Many of the tools and techniques described in this document are available only in Microsoft Office Professional Edition 2003, Microsoft Office Professional Enterprise Edition 2003, and the individual versions of each program. This means that both from a development perspective as well as from a user's perspective, solutions using these specific capabilities do not work without one of these versions. Those features that are available in all Office 2003 Editions are as follows:

  • XML reference schemas for documents and templates.
    Note   Microsoft Office InfoPath 2003 is available only in Office Professional Enterprise Edition 2003.
  • Research task pane
  • Smart tags
  • Primary interop assemblies (PIAs)
  • Support for Web services
    Note   Support for use with Microsoft Visual Studio Tools for the Microsoft Office System or Microsoft Office Information Bridge Framework is available only with Office Professional Edition 2003.

Microsoft Office 2003 Editions are highly extensible. They offer efficient and effective development techniques and allow you to build solutions to address today's challenges around people, business processes, and information. Building custom solutions to solve some of these challenges can provide a host of benefits, not only to users and developers, but also to entire organizations and beyond.

XML at the Desktop

XML is a public and widely accepted standard that enables exchange of information between disparate systems. XML provides a flexible meta-language for creating text-based tags and relationships that you can use to define and distinguish document structure or presentation and content. This separation of content from presentation allows you to manipulate document content more easily in a meaningful way. However, even though many businesses rely on XML for data exchange and transaction processing, and even though the necessary servers and architecture are in place on the Internet and at the enterprise level, XML is not fully exploited in solutions involving user interaction. Previously, it was difficult to separate document data from structure and formatting information. The enhanced XML support in many of the productivity applications in the Office 2003 Editions makes these much easier, thereby enabling rich solutions that bring the power of XML to the desktop.

You can use XML support in Office Professional Edition 2003 in two significant ways. First, Microsoft defined W3C-compliant XML schemas (XSDs) to represent the structure of Word documents, Excel spreadsheets and InfoPath form templates. These fully documented and published schemas enable you to understand and manipulate documents using any software that can process industry standard XML, without using programs in Office 2003 Editions. The second XML feature area is the support for custom-defined XML schema. This feature allows you to define any schema that represents your business information and use that schema and the associated data within Office Professional Edition 2003. Each of these capabilities is discussed in detail in subsequent sections.

Suggested Next Steps

XML Reference Schemas for Documents and Templates

XML Schema is a standard recommended by the World Wide Web Consortium (W3C). An XML schema defines the set of tags in an XML document and the rules for applying them. Schemas define the structure and type of data that each data element in a document can contain. Anyone can create a schema to define and qualify the content for their application; Microsoft defined schemas that abide by the XML Schema 1.0 recommendation for Word documents, Excel spreadsheets, and InfoPath form templates. For Microsoft Office Word 2003 and Microsoft Office Excel 2003, you can view these schemas as alternative file formats to the well-known binary (.doc and .xls) formats. The schema for Microsoft Office InfoPath 2003 defines the structure for InfoPath forms.

XML Reference Schema Benefits

In the past, when working with the binary file formats for Office 2003 Editions, it was difficult to interpret content without starting the appropriate Office program and automating it through its object model. Not only is it inefficient for any Office program to begin, but the Office programs were not written and are not supported to be run from a server. This restricted how you could use document content.

The advent of an XML file format changes this restriction. XML is text-based and can be read and manipulated outside of the Office programs by using any tools and techniques that support the XML standards. This opens up a number of interesting and beneficial scenarios for developers:

  • Creating a document on a server. You can assemble XML on a server to create a Word document, Excel spreadsheet, or InfoPath form template fully. For Word and Excel, you can accomplish this by retrieving information from a database or Web service and applying an XML transform (XSLT) that adds formatting and structure to result in a rich document. This is a useful technique for the automated creation of any type of document. You can use this technique, for example, to create a report periodically such as an on demand, customized report, or a document with customized information specific to many individuals, for example, thousands, or millions of customers.
  • Reuse, indexing, and searching of document data. When documents are created, they often need information copied from existing documents, particularly those created from the same template. For example, sales proposals are created repetitiously. Previously created information is reused when pulling together proposals to customers from similar types of companies.

    In the past, it was difficult for a user to find the right document with the most appropriate related information, and if found, users copied information manually into the new document. It also was difficult for a developer to build a solution to help the user since information was difficult to access from the binary file formats. With the XML file formats, Office 2003 Editions save documents as text files. Consequently, you can process them using many standard XML processing techniques to find needed information efficiently and then extract just the desired section from an existing document. XML helps you build such a solution in much less time than it took previously. The XML-based solution allows the user to complete a task more efficiently without having to know anything about XML.

  • Sharing data across heterogeneous systems. XML is used today as a means of data interchange for the reasons mentioned previously. Since it is text-based, you can read XML documents on all platforms. Sharing binary documents is not as easy since they are captive to platform issues such as storage formats and byte order. Information cannot be easily extracted from a binary file without sharing a low-level programming protocol to read the file. With XML, cross-platform computer-based processing is possible. This enables documents to have an acceptable transfer format for document-centric solutions.
  • Formatting information being inserted. Formatting in a Word document is always an important aspect of the presentation of information. However, many documents need content from databases that is in a raw format with no related display information. You can use XML transforms to associate XML data streams with specific formatting so that when the transformed XML data arrives in Word, it appears formatted as needed to fit that document solution. XML makes it easier for you to provide this capability. The capability simplifies routine formatting work an information worker would otherwise spend (unproductive) time performing.

XML Reference Schema Technology

The next sections highlight the XML reference schema capability in each application in Office 2003 Editions.

  • Microsoft Office Word 2003. The Word 2003 XML format or schema, called WordprocessingML, is available in all versions of Word 2003. This format is an alternative file format to the well-known .doc binary format and saves all of the same information that is saved in the Word binary format. This means that if you saved a document as WordprocessingML and reopened it, Word retains every document feature. Word saves the WordprocessingML file with a processing instruction at the top of the file so that when a user opens a WordprocessingML file from Microsoft Windows Explorer or Microsoft Internet Explorer, Windows opens the XML file directly in Word. Organizations or individuals can configure Word or specific templates in Word to save in the WordprocessingML format by default.

    Saving a full Word document as XML results in a detailed XML file with several namespaces. However, the structure of WordprocessingML is not complex. The simplest WordprocessingML document consists of just five elements and one namespace:

    <?xml version="1.0"?>
                    <w:t>Hello, World.</w:t>

    Although Word saves all of the document information in the XML file, several types of information are saved in a "binary" format through base-64 encoding (a standard technique for XML). Word saves all the details to which it has access as text. Base-64 encoding is needed for items such as images (which are binary), Microsoft ActiveX controls (which do not support a protocol for saving in an XML format), and Microsoft Visual Basic for Application (VBA) projects (which do not provide a mechanism for Word to save as text).

    Although XML provides for greater interoperability with heterogeneous systems, WordprocessingML files are not recognized by previous versions of Word, which treats them as XML files of an unknown type.

  • Microsoft Office Excel 2003. The Excel 2003 XML format or schema, called SpreadsheetML, is available in all versions of Excel 2003. This format saves spreadsheet content and information about workbooks, worksheets, formulas, formatting, Microsoft Office PivotTable dynamic views and much more. However, unlike the Word XML format, SpreadsheetML does not save all details associated with a workbook. You can find a list of items that are not saved on Office Online under the (search) topic, "Features and limitations of XML Spreadsheet format in Excel." Excel saves the SpreadsheetML file with a processing instruction at the top of the file so that when a user opens a SpreadsheetML file from Windows Explorer or Internet Explorer, Windows opens the XML file directly in Excel 2003. Microsoft Office XP and Microsoft Excel 2002 also supported SpreadsheetML. Excel 2003 adds new features by using a new namespace: "urn:schemas-microsoft-com:office:excel2".
  • Microsoft Office InfoPath 2003. Unlike Word and Excel, InfoPath does not define a file format since information captured through InfoPath is saved in the XML format defined by the developer of an InfoPath solution. Instead, InfoPath uses an XML schema, called FormTemplate, which is saved with a file extension of .xsf, to define the layout for InfoPath forms. FormTemplate defines information about all other files and components used within an InfoPath form, including UI customizations, XML schemas, views, business logic, events, and deployment settings. The .xsf file holds information about how the form is constructed, used, and deployed. When the InfoPath designer creates a solution, InfoPath creates and manages this file automatically. While you do not usually need to modify this file, directly editing the .xsf file does enable you to extend form functionality in some ways that are not possible through the designer UI.

Suggested Next Steps

Custom-defined XML Schema Support

Schemas define the structure and type of data that each element in an XML document can contain. You can use a schema to define the format of information needed for a particular application and then use the schema to ensure that the solution captures and manipulates valid XML data. Word 2003, Excel 2003, and Microsoft Office Access 2003 have many new features to support custom schemas that adhere to the W3C 1.0 recommendation for XML Schema, allowing you to work with information more easily in a familiar, specific format rather than navigating various aspects of specific object models for individual Office applications.

Note   Custom-defined XML schema support is available only in Microsoft Office Professional Edition 2003, Microsoft Office Professional Enterprise Edition, and the standalone versions of each individual product.

Custom-defined XML Schema Benefits

All data has meaning within the context of a business. The custom-defined XML schema support in Office 2003 Editions allows you to work with data that is marked according to a business-defined schema more often than unlabeled text items in Office documents. For example, purchase orders contain data such as prices and item numbers. Before Office 2003 Editions and custom XML schema support, these data existed as simply numbers displayed in the cells of a spreadsheet or somewhere within a Word document range. You were required to know the structure of the document (for example, spreadsheet cell reference, named range, Word structure, or bookmark) in order to read or set the value. If you moved the item to another position in the document, you had to find and change every line of code that accessed the value. With an XML schema mapped to the document, you can read or set the value by referring to an XPath statement based on the schema. This method of access is independent of where the data appears in the document because it references the XML structure. The following example shows how to set a value to XML-mapped data in Word using an XPath expression. This both simplifies the code by requiring only one statement and makes the solution more robust by separating the access method to the data from the document layout or formatting.

Sample schema:

<?xml version="1.0"?>
<xs:schema xmlns:xs=""
<xs:element name="PurchaseOrder">
<xs:element name="Company" type="xs:string"/>
<xs:element name="NumberItems" type="xs:integer"/>

This XPath statement refers to the <Company> element:


This statement is one way to set the value of the data in the Word document associated with the <Company> element using an XPath statement in Visual Basic:

ActiveDocument.XMLNodes(1).SelectSingleNode( "/n:PurchaseOrder/n:Company ", 
"xmlns:n='uri:myNS'" ).Text = "NewValue"

This ease of working with XML schemas applies to how to access data in documents programmatically, how to format data, how to incorporate data from external sources, and how to extract data from a document or file. In addition, Word and Excel provide events relating to the custom XML structure in a document to facilitate the creation of more intelligent solutions, such as the smart document solution model described subsequently in this document. Although some capabilities enabled by XML schemas could have been implemented previously with clever and extensive coding, those solutions were fragile and difficult to create.

Using XML and custom XML schema also simplifies the integration of a document with corporate data and business processes. Word and Excel-based solutions can more directly exchange information with any Web service or other XML interfaces, such as those built into popular products such as Microsoft SQL Server 2000 and Microsoft BizTalk Server. XML exchange is often handled through loosely coupled connections, such as Web services, which allow you to orchestrate software components and reuse them in a more flexible architecture.

Custom XML schema support simplifies the development of data-centric document solutions allowing you to work with data in a form that matches business needs while adhering to accepted industry standards. The following sections discuss specific Office support for XML in each application.

Custom-defined XML Schema Technology

In Office 2003 Editions, you can visually map data elements from a schema to regions in Word and Excel documents through new UI and to controls in InfoPath forms. In general, you can make the XML tags invisible to the end user of the solution. Although many XML features are designed through the UI, you also have access to XML features through object model support. Office retains the custom XML schema information in the XML document formats allowing subsequent processing to be specific to the custom XML data.

Microsoft Office Word 2003. Word with custom XML tags is still Word. You should consider using a custom XML schema as part of a Word solution to create a solution that is more intelligent, that allows for capture of structured and semi-structured content, or that is more robust and more easily updated. XML adds structure to a Word document but does not affect the user's ability to use all the rich editing features that they expect, including spell check, change tracking, AutoCorrect and more. Word 2003 is not intended to be an XML editor where the sole purpose is to manipulate XML tags and attributes, and as such does not provide a streamlined out-of-the-box experience for end users to manipulate XML tags directly.

You can use the task pane to map schema elements to ranges in a Word document or template. The document becomes effectively marked with tags that reveal locations of the XML elements, as seen in Figure 1. You can toggle between the tagged view and normal view to compare the structure against the intended view while editing the document. Word requires that the elements exist in the same order in the document as they are in the schema. If you wish to use a schema that does not have the structure as the desired document layout, you should create a schema to match the document layout, and use XSLT transforms to change the format of the data when bringing it in or sending it out of the document. Word performs real-time validation of the document data against the attached schema as it is entered or edited and flags the errors with a subtle UI while raising validation error events.

Click here to see larger image

Figure 1. Customer-defined XML in Word 2003 (Click picture to view larger image)

To insert formatted information in Word, you can transform an input data stream to become valid WordprocessingML. You can insert this WordprocessingML in a document with any valid Word formatting characteristics. To insert just data into an existing Word template with custom XML tags, you can either transform the XML to WordprocessingML and replace a selection or copy the XML data element by element.

You can save documents that use a custom-defined schema as "data-only" which means that Word saves only the XML data in a file according to the custom schema's structure. Conversely, you can save documents using the full Word XML schema (WordprocessingML). The WordprocessingML format incorporates all custom XML elements, allowing you to use standard XML techniques against the saved XML file to access and change any of the WordprocessingML or custom XML markup at will.

Word allows you to manage multiple custom schemas on a computer by using the Schema Library. The Schema Library organizes schemas according to namespaces and provides a mechanism to associate transforms (XSLT files) and solutions (smart documents) with a namespace. This allows you to configure Word to process raw XML using a custom default behavior of applying a transform or prompting the user for related solutions.

The custom XML schema support in Word enables you to build powerful solutions using XML to build those solutions more easily and in a way that yields document content that you can easily reuse.

Microsoft Office Excel 2003. Excel with a mapped custom XML schema is still Excel. XML makes it easier to build Excel solutions that aggregate data and provide analytical capabilities. Excel allows you to map the elements of any custom W3C-compliant XML schema within the structure of one or more spreadsheets. Excel also provides a visual data-mapping tool in a task pane (as shown in Figure 2). Unlike the visual inline XML tags that surround words or ranges in a Word document, Excel designates mapped elements with blue, nonprinting cell borders. Excel maps individual elements as defined by the schema to single cells and maps repeating cells to the new List feature. Although geared toward end-user scenarios, you can access Excel Lists programmatically by using the object model. Lists also offer direct read/write connectivity to lists in Microsoft Windows SharePoint Services. Excel does not have a capability to work with XML easily that includes repeating elements within other repeating elements.

Click here to see larger image

Figure 2. Custom-defined XML schema mapping in Excel (Click picture to view larger image)

You can map multiple schemas to a workbook although you cannot map multiple elements to the same cell location. Often you may use one schema to bring in data and another for exporting data. Excel makes it very easy to bring XML data into a schema map, or to export it. If you open an XML file in Excel without a reference to a schema, Excel offers to infer a schema from the XML data and structure. If you save a workbook as SpreadsheetML, Excel saves the map details in the file format and saves complete copies of the respective schemas.

Excel does not do real-time validation against any attached schemas since with the two-dimensional layout of a spreadsheet it is difficult for you to know where the user last worked. However, you can request a validation at any time in order to notify a user of any errors at specific stages of a solution.

Although Excel doesn't provide native support for Web services, since the XML map in a worksheet acts like a display transform, it is fairly easy to use code in Microsoft Visual Studio .NET to receive data from a Web service and then use the Excel object model to place the data directly into a map using one method. This is a significant productivity boost from previously available data manipulation techniques.

Microsoft Office InfoPath 2003. A custom XML schema is at the core of every InfoPath form solution. Controls on InfoPath forms map to XML elements defined by the schema, and InfoPath enforces the validity of the captured information according to the schema. The result of information captured in InfoPath is an XML file in the format of the custom XML schema; InfoPath has no special file format. You can only use one schema as the basis for a form.

When designing a form from a custom schema, InfoPath provides suggested controls based on the data type specified by the schema, for example, a single line text control is suggested for the XSD string type; a date control is suggested for the XSD date type.

When InfoPath forms save captured information as XML, it includes a PI (XML processing instruction) at the top of the document that identifies the corresponding template solution so that the document is always connected with that specific form template. In the same way, you can open any XML of that namespace with that InfoPath form template.

For more information, see InfoPath 2003.

Microsoft Office Access 2003. Access uses custom XML schema primarily for importing and exporting data for greater ease of data exchange with other systems. You can also apply XSL transforms during an import or export, providing you with more flexibility over the shapes of XML that you can use.

When importing XML data, if the XML refers to an accompanying schema, Access recognizes data types based on the schema definition. However, importing XML data into Access does not require a schema. If there is no schema reference, Access infers a structure from the incoming data.

Access also offers more flexibility than previous versions of Access for exporting data as XML. You can limit an export to only data selected with respect to current Filter and Sort views. Access can also export related tables as XML. This way, you can include hierarchical data in one standard XML file for consumption in other systems.


Figure 3. Import XML options UI in Access 2003

All support for importing and exporting XML is available through UI objects as well as programmatically. Figure 3 shows the available dialog to import XML. To enable this, there are enhancements to the XML object model, including a new TransformXML method and additional parameters for the ExportXML method.

Suggested Next Steps





Smart Documents

A smart document is a document-based solution that provides a user with help information, auxiliary data, available actions, and custom tools that are pertinent to where a user is working in the document. These items are presented dynamically when a user enters that region of the document. With this type of solution, it is easier for someone to work with the document because the solution can guide her and provide supporting information. Smart document solutions are supported in Word 2003 and Excel 2003. Smart document solutions build off the custom XML schema capabilities in those products. Figure 4 shows a smart document solution using Excel with task-specific guidance and tools that help perform a budgetary analysis through the right-hand task pane. Smart document scenarios can include such varying tasks as streamlining a financial analysis or numerical aggregation in Excel, or managing a sales proposal or a legal compliance form in Word.

Click here to see larger image

Figure 4. Smart document solution in Excel (Click picture to view larger image)

Smart Document Benefits

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. At the same time, users continue to enjoy the familiarity of working with Word and Excel.

You can enable this enhanced UI through a programmable task pane that can contain any variation of data, help, and common controls such as buttons, check boxes, option buttons, and list boxes hyperlinks, images, free text, and more. This allows you to create solutions that offer a richer UI, provide content that is relevant to the specific task a user needs to perform within a specific section of a document, and extend documents to integrate with other processes and systems seamlessly. You can also manage task pane events to perform actions on behalf of the user. All of this allows an organization to manage its information with a higher level of integrity.

You can deploy smart document solutions using a new mechanism that enables installation when a user simply opens a document that was obtained by using e-mail or downloaded from a Web server or file server. These solutions implement a high standard of security that is subject to Office security settings, demands trusted servers for deployment sites, and requires all solution code to be signed. Smart documents also can automatically update themselves from a trusted server location, making solution upgrades easier. You need not install or manage the client-side code directly.

Smart Document Technology

You can use an existing document or start from scratch to build a smart document solution. To do so, you must attach the document to an underlying XML schema. For more information, see Custom-defined XML Schema Support. The solution then uses the schema as the basis for marking it with corresponding XML elements. You write code to respond to events that fire when the user's insertion point enters a document range mapped to an XML element. The custom code should provide the user with specialized UI in the task pane.

There are a number of techniques available to create smart documents, including the ISmartDocument interface, Visual Studio 2005 Tools for Office and Information Bridge Framework. Each provides a different flavor of technology and suits a different type of solution's needs. Note that you cannot use Microsoft Visual Studio Tools for the Microsoft Office System version 2003 to create smart document solutions because it does not provide programmability access to the task pane. The following table provides the major decisions factors for each technology. The paragraphs that follow describe the underlying technologies.

Table 1. Smart Document Development Technology Options

SolutionExpected rollout of your solutionTechnologyOther considerations
Visual Studio 2005 Tools for Office2005.NET-basedMost flexible
ISmartDocument interface2004 +COM-based

.NET-based with PIAs or Vertigo Managed Smart Document Wrapper

Restricted task pane layout
Information Bridge Framework2004 +.NET-based with declarative programming; requires infrastructure investmentBetter for less document interaction, focus on exposing business system data/functionality, committed to multiple solutions

ISmartDocument interface. As mentioned previously, a smart document solution needs a document with an underlying XML structure. Then, you can use the COM-based ISmartDocument interface to build the automation that drives the solution. The code you write manipulates the document directly, presents information in the task pane, and interacts with server-side processes, such as retrieving data, routing the document or its contents to a business system to complete the solution.

You can create a DLL to implement the ISmartDocument interface using COM-based or .NET-based technologies and thereby use your language of choice. For implementations using the .NET Framework, Office 2003 Editions includes a PIA to simplify the task of creating .NET-based code that interacts with the COM-based ISmartDocument interface.

To connect the Word or Excel document template that a user accesses to all the supporting files (such as DLL, XSD or XSL) associated with a smart document solution, you must create an XML file called a manifest. The manifest file identifies all the solution components, their versions and how they should be installed for the solution to work (such as on the server, on the client, in a particular directory). You place the solution files with the manifest file on a trusted server. When the user opens this type of smart document, the manifest technology in Office 2003 Editions checks the document's internal metadata, specified as custom document properties when you create the solution, to locate the assigned manifest. It inspects the manifest to ensure that the entire solution is available, operational, and secure, and that any new files are downloaded as needed. This dramatically simplifies deployment and maintenance for you because the document or template and the code that drives the solution exist independently of each other. You can version and update them separately.

Implementing the ISmartDocument interface with code for the .NET Framework can be a challenge due to the difficulty of getting all the references, code requirements and security issues set up correctly. Although a number of examples are provided through MSDN, a very usable option is to use a "wrapper" interface such as that built by Vertigo Software, called the Managed Smart Documents Wrapper. It provides an abstraction of the ISmartDocument interface that makes it easier for you to build and deploy a smart document solution using .NET-based technologies now and then migrate your code to Visual Studio 2005 Tools for Office.

Visual Studio 2005 Tools for Office. Among many uses, these tools improve how you can implement smart document solutions by providing .NET-based events off XML elements, data binding to the XML structure and a greater flexibility by allowing custom-defined Windows Forms user controls in the task pane. The resulting solutions benefit from the .NET Framework security model.

For more information about Visual Studio 2005 Tools for Office, see Microsoft Office Developer Center: Visual Studio Tools for the Microsoft Office System

Information Bridge Framework. You can use the Information Bridge Framework to build smart documents as well. However, solutions built using the Information Bridge Framework require a significant upfront investment in enterprise Web services and metadata design. Given this, if an organization is (1) investing in an Information Bridge Framework infrastructure for tying together information coming from multiple back-end systems, (2) considering multiple solutions that can use an Information Bridge Framework infrastructure, and/or (3) wants to use a declarative programming model, Information Bridge Framework technologies make sense.

For more information about Information Bridge Framework, see Information Bridge Framework.

Suggested Next Steps

See the following resources:


Visual Studio 2005 Tools for Office

Information Bridge Framework

Research Task Pane

The Research task pane is new task pane introduced with Office 2003 Editions that allows users of Office applications to search for a word or phrase in any of a number of information sources without leaving the context of the Office application. Two examples of the Research task pane are shown in Figure 5, one searching default information sources provided with Office 2003 Editions and one searching a custom research service.

Click here to see larger image

Figure 5. Default and custom research task panes (Click picture to view larger image)

Research Task Pane Benefits

With this feature being available in most Office programs, users do not have to navigate among separate windows in order to perform a quick lookup of information (for example, to perform a search through a browser). Users have one convenient way to look up terms within the context of their document. Through search results, users may also have a set of features available to them to incorporate the information into their documents.

Developers and organizations benefit through the ease of making corporate information available to all (or select) users in the task pane by implementing a straightforward, industry standard Web service that exposes the information. The services available to users can be configured and updated from a server or through policy.

Research Task Pane Technology

The Research task pane is available in Word, Excel, Microsoft Office Outlook 2003, Microsoft Office PowerPoint 2003, Microsoft Office Publisher 2003, Microsoft Office OneNote 2003, Microsoft Office Visio 2003, and Internet Explorer (when an Office program is installed). Search options that come with Office 2003 Editions include basic resources such as thesauruses and dictionaries in multiple languages, language translation, an online encyclopedia, and Web searching. There is also a simple Web service URL that you can activate to initiate a search against SharePoint sites.

To expose information in the Research task pane, you implement an industry standard Web service using the method names and schemas expected by the Research task pane. The schemas describe the expected query and result XML streams. You can set up searches to access local and remote data sources, both behind a corporate firewall and on the Internet. Security can use Windows Authentication or Internet passwords. The Research task pane shares cookies and caching with Internet Explorer. The Research task pane can be controlled by administrators at a corporate level, automatically rolling out services or broadcasting their availability using a Discovery Web service for research services.

For basic features such as displaying results and copying items to the clipboard, a Research service does not require any client-side code beyond an Office installation. However, you can customize a research service to contain smart tag actions for extended document interactions. Smart tags require that you install a DLL locally. Though once installed, you can make smart tag actions with full client-side functionality available through menus in research service results.

Suggested Next Steps

Smart Tags

Smart tags are programmed to identify terms and regions in a document that are of interest to those working with the document. They nominally appear as a dotted underline near which a menu icon appears when the user's mouse cursor clicks in or hovers over the marked region. The context-specific menus for smart tags present users with actions related to the text, cells, or regions of a document where they appear. Figure 6 shows a basic smart tag underline with the smart tag icon in the left picture and the resulting menu in the right picture.

Click here to see larger image

Figure 6. Selecting a smart tag (Click picture to view larger image)

A. Words marked by a smart tag
B. Icon when mouse hovers over
C. Custom menu appears upon clicking

Smart Tag Benefits

You can build smart tags to recognize key data terms inside documents and e-mail messages, allowing users to perform custom actions associated with the specific data elements directly from their document efficiently. Smart tags can link users to relevant corporate data, streamline cumbersome tasks, or perform any number of operations that are sensibly associated with the tagged data.

Smart Tag Technology

Smart tags were introduced in Office XP and improved in Office 2003 Editions based on feedback from users and developers. Within Office 2003 Editions, smart tag functionality is available in Word, Excel, Outlook when using Word 2003 as the e-mail editor, Access and PowerPoint. You can also use smart tags with people names using the persona menu in Outlook, all task panes in Office 2003 Editions, and with Microsoft SharePoint Products and Technologies. You can also use smart tag actions in Microsoft Internet Explorer for smart tags that are embedded in Web pages.

Implementing smart tags involves two primary interfaces, one for recognizing and marking text, ISmartTagRecognizer, and one for executing actions, ISmartTagAction. Office 2003 Editions offer new functionality by using the extended interfaces of ISmartTagRecognizer2 and ISmartTagAction2. You nominally build COM DLLs to implement these interfaces, although PIAs are available so that you can implement smart tags using Visual Studio .NET. Visual Studio 2005 Tools for Office also offers a capability for creating managed smart tags, though specifically for Word and Excel document-based solutions. Another option is to implement simpler smart tags through XML files using Microsoft Office Smart Tag Lists (MOSTL). Recognizers and actions are connected through a type identifier and you can even implement them using a combination of these technologies.

Smart tags in Office 2003 Editions include the following improvements:

  • The ability to alter smart tag action menus at run time, including eliminating individual menu items. This facilitates more solution flexibility.
  • Support for cascading action menus, so you can logically group actions by hierarchy. This can help users find related actions, help shorten the overall menu length or simply consolidate actions so they are separated from other action handlers.
  • The ability to register smart tags at a computer level and not just for individual users.
  • Improved tokenization and pattern matching using regular expressions to simplify writing recognizers.
  • New smart tag characteristics, such as smart tags that expire and those that cannot be saved in documents.

As one technology for building smart tag actions, the Information Bridge Framework provides a declarative model for exposing information and actions from business systems that relate to phrases recognized by smart tags.

Suggested Next Steps

Web Services Support

Web services are an industry standard for enabling the exchange of data and the remote invocation of application logic using XML messaging and Internet technologies to move data through firewalls and between heterogeneous systems. Although remote access of data and application logic is not a new concept, doing so in the loosely coupled fashion of Internet protocols is. The only assumption between the client and the Web service is that recipients understand the messages they receive. As a result, programs written in any language, using any component model, and running on any operating system can access Web services.

Web Services Support Benefits

Web services make it easier for you to expose data from legacy systems to authorized users around the company. Often these targeted users are those who previously needed the data but, until the advent of solutions using Web services, had no simple way of accessing it.

Web Services Support Technology

The recommended way to connect programs in Office 2003 Editions with Web services is to use Visual Studio .NET. With Visual Studio, you can more easily take advantage of the latest Web service standards with minimal code and have a host of rich objects available with which to manipulate the XML payloads. You can then integrate the XML from Web services into the custom-defined schema capabilities of Office programs, and vice-versa.

For integrating Word and Excel document solutions with Web services, Visual Studio 2005 Tools for Office is a natural development tool. In addition, the Information Bridge Framework helps you create relationships between multiple business systems using Web services and associated metadata, which you can then incorporate into Office solutions.

If you need to access Web services from VBA (or Visual Basic 6), you can download the free Microsoft Office 2003 Editions Web Services Toolkit, which helps create the code necessary to interface with basic Web services. Note that this toolkit is provided on an "as-is" basis and support is only available through a peer-to-peer newsgroup. Other developers could interoperate with Web services in any environment by manually interpreting the SOAP messages.

Suggested Next Steps

Primary Interop Assemblies

Developers increasingly seek to build solutions using code that runs on the .NET Framework, called managed code, because of increased security, robustness, and productivity. In order for managed code to interoperate with COM interfaces, such as the Office object models, developers need to use a managed assembly that describes the COM interface types. This type of managed assembly, called a Primary Interop Assembly or PIA, allows managed applications to bind to the COM types at compile time, and provides a run time interface for the .NET Framework.

Microsoft includes Primary Interop Assemblies with Office 2003 Editions to make it easier for developers to write code using Visual Studio .NET to automate Office applications. Primary Interop Assemblies are also available for the smart tag and ISmartDocument interfaces.

Primary Interop Assemblies Benefits

Primary Interop Assemblies (PIAs) allow you to build solutions for Office 2003 Editions using managed code. This means you can take advantage of the benefits of Visual Studio .NET and the .NET Framework when developing and deploying Office solutions.

Primary Interop Assemblies Technology

The Office 2003 PIAs are available when you install the Office 2003 Editions as optional items called .NET Programmability Support. You can choose to install .NET Programmability Support for Access, PowerPoint, Outlook, Publisher, Word, and Excel. Under Office Tools, you can also install the Smart Tag .NET Programmability Support to add the PIAs for smart tags and smart documents and Microsoft Forms 2.0 .NET Programmability Support to install the PIAs for forms and graphs. We recommend you install all of them so that you have the appropriate interface for any custom managed Office solution you choose to create.

Visual Studio Tools for Office version 2003 and Visual Studio 2005 Tools for Office both require that you install these options for developing managed code solutions for Word and Excel.

Suggested Next Steps

Network Deployment and Updating Models

With Office 2003 Editions you can deploy, manage, and update several types of solutions from a server. This is a dramatic departure from the previous options available to developers that invariably required you to register COM DLLs manually on desktop computers.

Network Deployment Benefits

Being able to deploy the code for a solution from a network server enables you to deploy and manage it more easily. This is a primary reason why Web-based solutions are so popular. Until the advent of the .NET Framework and the new options for Office 2003 Editions solutions, deploying client-side code was particularly problematic. Managing a solution is also easier from a server as you can publish a newer version on the server and the solution automatically updates itself.

Server-based deployments also improve the security of desktop solution code by managing more of the application and data access privileges from a centralized server within a trusted zone. Assemblies built with managed code can also follow robust .NET security protocols.

Network Deployment Technology

With Office 2003 Editions, there are two technologies available for deploying solution code from a network. The first technology is for smart document solutions built using the ISmartDocument interface with an XML solution manifest. The second is for solutions built using the Visual Studio Tools for Office. Both only support document-based solutions for Word and Excel.

In each case, the deployment works by placing the solution code on a trusted server and giving the user the document or template for the solution. When the user opens the document, assuming they have a network connection, appropriate security checks are made. If all security checks pass, the custom code is downloaded to the local computer. Periodically when the user opens the document, the solution checks the server location for updates making solution maintenance easier.

  • Smart document solutions using the ISmartDocument interface. For this type of solution, the document contains a custom document property that points to the XML manifest file. When the document is opened, Office 2003 Editions verifies that the manifest file is digitally signed, and second, Office 2003 Editions verifies that the code components included with the smart document are also signed. The code must also exist on a trusted server location. This type of smart document solution, if built with managed code, also undergoes .NET-based security checks. For more details about smart document security, see the Office 2003 Smart Document SDK.

    If security checks pass, you can choose to install the solution code locally or keep it on the server, depending on how you configure the solution. If you configure the solution to install all solution files locally and the solution does not need other network resources, the solution can work offline. Solution updates occur based on version numbers for each individual file in the manifest. The solution contains an XML element that signifies how often to check for updates.

  • Visual Studio Tools for Office version 2003 and Visual Studio 2005 Tools for Office. For this type of solution, the document also contains a custom document property that points, in this case, to the main interfacing assembly. The solution does not run unless it has full trust according to .NET-based code access security. If security checks pass, the solution code is downloaded into the Internet Explorer cache for the solution to run. As long as the solution code remains in the cache, the solution can work offline. When connected and the administrator places a new version on the server, the new version is downloaded to update the local cached copy.

Suggested Next Steps

Access 2003 Runtime

Access provides a rich platform for developing database management solutions. To distribute those Access solutions so that they run without requiring a full installation of Access, you can package and distribute your application with the Access 2003 Runtime. The Access 2003 Runtime is essentially a full version of Access 2003, but with certain design-time features disabled.

Access 2003 Runtime Benefits

The Access 2003 Runtime allows you to build powerful, Access-based solutions and use the royalty-free Runtime to distribute them without customers needing to purchase additional licenses of Access software. Besides the obvious benefit of cost efficiency for the customer and maximizing profit for the developer, Access Runtime solutions are easier for you to deploy and update since you can manage your solution without being concerned about what version of Office a customer may have.

Access 2003 Runtime Technology

The Access 2003 Runtime license allowing royalty-free distribution comes with the Microsoft Office Access 2003 Developer Extensions, which is a component of Visual Studio Tools for Office version 2003. A developer who is licensed for this product can bundle a solution (.mdb files and any other support files) with the Access 2003 Runtime and distribute it to as many users as necessary. There is no limit to the number of distributions or the number of Access Runtime solutions that you can create using one license. The physical runtime files are included with Microsoft Office 2003 Professional Edition or Microsoft Office Access 2003, so you must also own a copy of one of these products, although this is not a requirement for the end customer. The Package Wizard, which comes with the Access 2003 Developer Extensions, helps you create a professional installation package for the solution.

The Access 2003 Runtime is, in essence, Microsoft Office Access 2003, but with a few key features disabled. A user with an Access 2003 Runtime solution installed instead of full Access can open and run the solution (either an .mdb file or, with a few extra steps, a SQL Server back-end database) but does not see the Database Window and cannot switch the view of any Access object to the Design view.

Suggested Next Steps

Solution Guidance

This section provides guidance as to which technologies may be more appropriate for specific development scenarios. Some information is directional though there is no commitment that Microsoft deliver such functionality or in the form described.

Scenarios included

  • Allow user to query corporate information sources at will while using Office
  • Allow user to use terms marked as smart tags in an Office document to bring up relevant views of corporate information and execute related actions
  • Pull information from any Web service into an Office document
  • Build a smart document solution with Word or Excel
  • Creating a rich, dynamic Word or Excel report
  • Creating a Word or Excel report on a server
  • Place custom UI elements on a document
  • Build a custom task pane to display content
  • Capture XML information using an Office application
  • Build a solution that can work with an offline
  • Build custom Excel worksheet functions
  • Roadmap for future VBA migration

Table 2. Scenario-based solutions

Allow user to search corporate information sources while using OfficeWhen using Word, Excel, Outlook, PowerPoint

Recommend Research Services. For informational or copy/paste purposes primarily. It is a simple, yet elegant Web service implementation, accessible by the user at any time through the task pane.

If there is a need to tie information together from multiple back-end systems, you can use Information Bridge Framework to aggregate the information. Then, you can build a Research service as a front-end service to these Information Bridge Framework Web services.

When using Word, Excel, Outlook

Recommend Information Bridge Framework, if an organization is:

  • Already investing in an Information Bridge Framework infrastructure
  • Interested in giving users actions to execute against back-end data

Interested in presenting a unified view of information coming from multiple back-end systems.

Allow user to use terms marked as smart tags in an Office document to bring up relevant views of corporate information and execute related actionsWhen using Word, Excel, Outlook

Recommend Information Bridge Framework. It provides the user with a capability to navigate to the information they need using a Windows Form or HTML UI in the default task pane or a popup window. If needed, Information Bridge Framework also helps you create relationships between information from multiple back-end systems for presenting a unified data view.

When using Access, PowerPoint

Use the ISmartTagAction interface in a smart tag DLL. You can access and present data by using .NET-based PIAs or COM-based code when implementing the ISmartTagAction interface in a smart tag DLL.

Pull information from any Web service into an Office documentWhen using Word, Excel

Recommend Visual Studio Tools for Office version 2003 with Visual Studio .NET 2003. Visual Studio .NET 2003 allows you to connect to industry standard Web services easily and manipulate the data in a variety of ways once retrieved. Visual Studio Tools for Office version 2003 makes it easy to create .NET-based code for Word and Excel document solutions. The code retrieves the Web service content as XML and then presents it in a document using the Office object model functionality.


Recommend Visual Studio 2005 Tools for Office with Information Bridge Framework. The use of Visual Studio 2005 Tools for Office allows you to use the latest Web service standards and manipulate the data in a variety of ways once retrieved. Visual Studio 2005 Tools for Office has a number of advanced data manipulation techniques and UI capabilities that give you greater control over how to insert the data in a document.

Coupling Visual Studio 2005 Tools for Office with the next version of Information Bridge Framework Web services is appropriate when

  • An organization is already investing in an Information Bridge Framework infrastructure.
  • You prefer to work with back-end data as "business objects" rather than individual data fields.
  • The solution needs to present a unified view of information coming from multiple back-end systems.

This approach takes advantage of both Information Bridge Framework's efficient meta-data and Web services architecture, and data binding and manipulation in Visual Studio 2005 Tools for Office.

When using InfoPath

Recommend using Visual Studio and InfoPath UI. Use Visual Studio to develop code that populates data in a form the latest Web service standards, and use InfoPath UI to provide out-of-the-box connectivity for secondary data sources.

When using Outlook, PowerPoint

Recommend using Visual Studio with the Office 2003 Editions PIAs to develop a custom solution. This allows you to benefit from capabilities in Visual Studio to connect to Web services and manipulate XML data. Web service capabilities in the next version of Information Bridge Framework will help you if:

  • Data from multiple business systems is needed
  • An organization is already investing in an Information Bridge Framework infrastructure.
Build a smart document solution with Word or Excel

A smart document is a Microsoft Office Word 2003 or Microsoft Office Excel 2003 document mapped to an underlying XML structure, which can be programmed to deliver context-sensitive help information automatically, auxiliary data, actions, and custom tools as the user moves through the XML structure in the document. This helps information workers more efficiently work with the document.

When using Word, Excel

Recommend Visual Studio 2005 Tools for Office. The action pane tools in Visual Studio 2005 Tools for Office provide an efficient way to create managed code solutions that use the task pane and a document's XML structure. With these tools, you have the most flexibility regarding the complexity and formatting of task panes that you can build and how tightly they connect to document manipulation. If you intend to pull information from back-end systems for integration in the task pane or document, Visual Studio 2005 Tools for Office UI can pull through Web services using the next version of Information Bridge Framework, giving you the advantages of referencing logical business objects optionally across multiple data sources.

Recommend ISmartDocument interface for COM-based scenarios.

Recommend the Vertigo managed smart document wrapper for building a solution with managed code until Visual Studio 2005 Tools for Office is released as a final product. Its abstraction of the ISmartDocument interface makes it easier for you to build a solution and deploy a solution. This implementation will also help you migrate your solution to Visual Studio 2005 Tools for Office when the final version is released.

Recommend Information Bridge Framework. If an organization is:

  • Investing in an Information Bridge Framework infrastructure for tying together information coming from multiple back-end systems.
  • Considering multiple solutions to use an Information Bridge Framework infrastructure
  • Interested in using a declarative programming model.

You can use Information Bridge Framework technologies to create a smart document. However, this is not viewed as a key scenario for this technology.

Create a rich, dynamic Word or Excel report using a document or template that updates upon opening, or on requestWhen using Word, Excel

Recommend Visual Studio Tool for Office version 2003 until Visual Studio 2005 Tools for Office is released as a product. You can use Visual Studio Tools for Office version 2003 to pull in and format information using standard Office UI. This allows you to benefit from the rich programming, data manipulation and security features of Visual Studio .NET 2003 and the .NET Framework.

Recommend Visual Studio 2005 Tools for Office for most features, optionally with Information Bridge Framework. Visual Studio 2005 Tools for Office gives you the greatest power and control over the report features that you can create. Advanced tools include data binding to XML and UI elements, placing managed controls on the document and incorporating an accompanying rich task pane.

Supplementing Visual Studio 2005 Tools for Office with Information Bridge Framework is appropriate when an organization needs a report to pull information from multiple business systems or has already invested in an Information Bridge Framework infrastructure that provides information for the report.

Here are various report features that you can include using Visual Studio 2005 Tools for Office:

  • Dynamic display. Many reports are static views whereas some reports are more valuable when the viewer has some control over the data presented. You can use UI elements on document and task panes to give the user various selection options.
  • Supplementary tools/information. A report could be a solution with complementary content that is presented through a programmable task pane.
  • Related business actions. The content in a report could lead the user to bring up other reports or want to access related data. This capability is best handled by marking important terms in the report with either smart tags or XML elements. The report could have smart tags and XML elements built in or use smart tags for dynamic labeling. Assuming corporate information coming from a Web service (rather than local desktop storage), Information Bridge Framework is best used to access and present auxiliary enterprise business information (in a task pane or pop-up WinForm window). Using Visual Studio 2005 Tools for Office, you can create a task pane view, which retrieves the appropriate data from Information Bridge Framework Web services.

When using Excel and SQL Server 2000

Recommend SQL Server 2000 Reporting Services. Reporting Services provides Visual Studio-based tools to create a sophisticated, dynamic report from SQL Server data easily.

When using Excel

Recommend Web Query and Database Query in Excel for quick, lightweight reports. You can build quick, lightweight reports using the Web Query and Database Query capabilities of Excel to pull data into a report. The Web Query has the advantage of allowing you to pull in data through a loosely coupled connection using URL addressing.

Creating a Word or Excel report on a serverWhen using Word, Excel

There are two ways to handle this task.

Recommend using XML. Using the XML file formats for Word and Excel, you can pull information from a business system and transform it using XSLT into a rich document. With this technique, you can pull separate data sets and apply appropriate formatting to each data set before putting them together into one full document. BizTalk server is recommended for complex XML manipulation and aggregation scenarios.

Note   There is a limitation to doing this using Excel, because the Excel XML file format does not support all Excel features, such as charts and images.

Recommend Visual Studio 2005 Tools for Office. With Visual Studio 2005 Tools for Office, you can create a document or template with an associated data cache that you can bind to displayed data locations in the document. Visual Studio 2005 Tools for Office provides a lightweight object model with which you can replace the data in this cache, thereby creating a report customized to a specific date, or customer, and so on. This allows an organization to have a server-side process to populate periodic, customized reports that does not require Office 2003 to be installed on the server. Note that the end user of the report needs Office 2003 Professional Edition and the .NET Framework installed to open the newly populated report.

Place custom UI elements on a documentWhen using Word, Excel

Recommend Visual Studio 2005 Tools for Office. It gives you the greatest power and control for using managed user controls and binding them to data sources, if needed.

When using InfoPath, PowerPoint

Recommend ActiveX. Use standard ActiveX controls.

Build a custom task pane to display contentThere are several approaches that you can take to build custom task panes. As to the specific options available, it depends on what you want to accomplish. The following are two common scenarios for using the task pane. Between them, they incorporate all of the technologies available for customizing the task pane.
Task pane scenario 1.

Create a task pane that is independent of a specific Office program, and allows users to access information when using any document

Choose the solution technique below according to the applications in use in the scenario, the UI programming model, other needed functionality, location of users and existing organizational infrastructure. In each case, build Web services as the mechanism for connecting the information source to Office.

When using Word, Excel, Outlook, PowerPoint

Recommend Research Services and the Research task pane.

  • Defines XML schema for how the data and UI layout are represented on the task pane
  • Supports additional functionality through client-side smart tag actions
  • Works well for Internet and intranet scenarios

When using Word, Excel, Outlook

Recommend the Information Bridge Framework.

  • Defines UI through HTML or Windows Forms
  • Supports additional functionality through HTML or Windows Forms programming
  • Better to use for intranet scenarios as it requires you to deploy a client-side runtime
Task pane scenario 2.

Create a task pane with specific content to complement the construction or use of an Office document

When using Word, Excel

Recommend a smart document solution. Technology is only available for use with Word and Excel documents. Create a document-specific task pane to act as a smart document, where it changes content as a user moves through a document, or to serve as a (relatively) more static palette of tools and information. This latter case is enabled by using the Visual Studio 2005 Tools for Office.

Capture XML information using an Office applicationThere are several approaches that can be taken to capture information in an XML format by using an Office program. Choose a solution according to the type of information being captured and the expected subsequent use of it. Although you could use Access interfaces to capture information, which is then subsequently exported as XML, this section focuses on Word, Excel and InfoPath.

Recommend using Word. Use Word to capture XML when the XML capture is an incidental part of creating a document. The creation of a document should be the focus. XML provides structure to Word documents to assist you in creating a robust document-based solution and allows for easier subsequent reuse of the document information through the XML file format. If the captured information is solely intended for a database or to be submitted to a business process or Web service in the form of a custom-defined schema then InfoPath provides better control over data validation and offers quicker form construction to capture information than Word. There are also a number of Word structures, such as controls, that you cannot easily map to XML elements without writing code to construct the desired XML.

Recommend using Excel. Use Excel to capture XML when the information being captured is part of a numerical data aggregation or analysis project. A typical use is for peer groups to use a common Excel template for entering periodic information (for example, monthly financials) which is rolled up into an overall analysis. An Excel template allows multiple users to use the power of Excel to consolidate and calculate the appropriate numbers to submit as a simple XML file; the common schema allows you to each XML results file in Excel. If calculations or numerical relationships are not necessary in the capture process, consider using InfoPath. The result of an InfoPath form is an XML file that you can merge and analyze using Excel.

Recommend using InfoPath. InfoPath provides rich form-like capabilities to capture information in an XML format. Any time you can consider a form as a mechanism to capture data easily, whether on-line or off-line, you should consider InfoPath. Due to the requirement that all users require InfoPath to fill out the forms, do not consider InfoPath for extranet scenarios where you are solely capturing a limited set of data within one session by a user. Web technologies are better for that scenario. However, InfoPath does provide the capability to fill out a form off-line which can provide a better experience for some extranet users when the filling out forms that require a lot of data, or require more time than a single sitting to complete. Alternatively, for scenarios that include collaboration and reviews before submission.

If high fidelity printing of the form is important, then consider Word. However, if it is better for the form to use many different controls, such as checkboxes and drop-down lists, InfoPath is still a better choice.

If the form should allow the user to have significant freedom in formatting information, such as creating their own tables or inserting images using the full range of accepted Word features, then consider Word as InfoPath does not provide the same level of flexibility.

You can use InfoPath to capture information that is used to generate or pre-populate a Word document or Excel spreadsheet. InfoPath forms are also easy to integrate with SharePoint form libraries to allow teams to share captured information.

Build a solution that can work offlineRecommend Smart Client Offline Application Block. Writing solutions that use client-side code has an advantage over Web applications in that they can be made to work offline. As a base level of functionality, Office programs allow users to save their intermediate work in a variety of file formats offline. The challenge for developers comes when secondary data sources need to be accessed offline, or when you need to submit data to a business process while offline.

To download the Smart Client Offline Application Block: Smart Client Offline Application Block

For more information about occasionally connected smart clients, see Chapter 4—Occasionally Connected Smart Clients

When using Word, Excel

Recommend Visual Studio 2005 Tools for Office. If you are building a document-specific solution around Word or Excel and you need to access a finite set of data through the solution interface, use Visual Studio 2005 Tools for Office. It provides an in-document data cache into which you can place any data. For example, you could use this with an Excel spreadsheet to hold additional data for analysis rather than storing the data in a hidden worksheet. This technique is not feasible for very large data sets since the data in the cache adds onto the size of the document file.

Build custom Excel worksheet functionsIf using COM, build Automation Add-ins.

If using .NET, build managed COM Add-ins and add registry keys to expose the solution as an automation add-in.

Read more about COM Add-ins and Automation Add-ins: Microsoft Knowledge Base Article - 291392: INFO: Excel COM Add-ins and Automation Add-ins

Roadmap for future VBA migrationMicrosoft plans to continue supporting VBA for the near future. However, you should consider taking advantage of the power and rich features of the .NET Framework and class library, plus sophisticated developer experience, security and deployment.

New document-centric solutions that in the past you built using VBA, you should now consider building with Visual Studio Tools for Office version 2003.


Microsoft Office 2003 Editions offers the latest innovations for delivering rich solutions targeted at one of the world's most popular software programs. With XML and Web services, Office 2003 Editions becomes 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, Office continues to equip you to build applications for any audience of users that satisfy a wide range of business needs.

Finally, Office 2003 Editions offer a professional development environment that builds on your knowledge and skills; simplifies deployment and management; and provides rich functionality, options, and choices. Office 2003 Editions offers innovative tools for building intelligent business applications.

To continue learning about innovations available for custom solutions using Office 2003 Editions, see Overview of Office 2003 Developer Tools and Programs.

Additional Resources

This section reviews the additional resources recommended throughout this document.

XML at the Desktop

XML Reference Schemas for Documents and Templates

Custom-defined XML Schema Support





Smart Documents


Visual Studio 2005 Tools for Office

Information Bridge Framework

Research Services

Smart Tags

Web Services Support

Network Deployment and Updating Models

Access 2003 Runtime

Solution Guidance

© 2015 Microsoft