|Figure 1: The Research Library is available from the task pane.|
icrosoft Office 2003 Editions add a powerful new tool to the Office task pane: the Research Library.By default, the Research Library allows you to type in a word or phrase and search for the term using several built-in resources. The Research Library is also extensible: you can add your own research service simply by creating a Web service that follows schemas defined by Microsoft for research services.
In this article, you’ll look at the nuts and bolts of the Research Library and see how you can use Microsoft Visual Studio .NET to create your own research service. If you are new to Microsoft Visual Basic .NET (VB.NET), you will become familiar with some of the coding techniques needed to create research services in VB.NET. You’ll also learn how to use various formatting tags to change the appearance of the result and how to provide a custom search form for your research service.
Working with the Research Library in the Task Pane
The Research Library is available from the task pane in Microsoft Office Excel 2003, Microsoft Office PowerPoint 2003, Microsoft Office Word 2003, and Microsoft Office Outlook 2003. You can display the Research task pane by selecting Research from the Tools menu, or by pressing Ctrl+F1 and choosing Research from the Other Task Panes drop-down list. As you can see in Figure 1, the Research task pane provides a text box for you to enter the word or phrase on which to search, a drop-down list where you can choose to limit the search to a single resource, and an area for displaying the results.
Figure 1 shows the Research task pane after the user has queried the thesaurus for a particular word; the user could have selected any of the resources shown in Figure 2 or searched all resources for the same term. You can customize the Research task pane to show other resources by clicking Research Options at the bottom of the pane. The Research Options dialog box, shown in Figure 3, lists additional resources. These resources are mostly international versions of the default resources. Although these resources may be useful, they are not as intriguing as the command button in the bottom left-hand corner of the dialog box: the Add Services button. It’s this button that separates the Research Library from other useful features available in interactive Office 2003.
Querying a Corporate Database: A Contacts Sample
To use the Northwind Contacts sample, enter a first or last name in the Search For text box. Figure 5 shows the result of a search for a particular name. In addition to the list of contacts, the search result includes a Search by country hyperlink at the bottom of the result list. When you select the hyperlink, the research service returns a list of all the countries in the Contacts table (Figure 6). Select a country and the research service returns a list of contacts in that country.
A Quick Guide to Web Services
A Web service receives information from a client as an XML packet, processes that information, and returns a response, also in XML format, to the client. Typically, the schemas for the call and response are determined by the developer of the Web service. To call a Web service, the developer of the client application must know what XML to send to the Web service and how to read and process the XML returned to the client.
If the Web service is built to be a part of the Research Library, the client is the Research task pane. All the code to send a request to the research service and process the returned XML packet has already been written. When you develop a research service, you don’t get to choose the schemas you use; the schemas have already been determined by Microsoft.
This article does not delve deeply into every element defined in each schema; rather it discusses those elements that are required and points out features that are available. The schemas used by the Research Library are all included in the Research SDK. The Research SDK will be available for download from the MSDN.Microsoft.com/Office Web site after Office 2003 ships.
Creating a Research Service in Visual Studio .NET
Visual Studio .NET 2003’s installation process walks you through installing and setting up the Microsoft .NET Framework and IIS. If you didn’t install them when you installed Visual Studio .NET, check out the Visual Studio .NET product documentation on MSDN.Microsoft.com for help.
Visual Studio NET makes it easy for you to build projects of different types by providing templates for those project types. When you choose to create a new project, you’ll see the dialog box shown in Figure 7. To create a research service, choose the ASP.NET Web service template and supply a name for your service in the Location text box.