Section 14.3.  The research pane

Prev don't be afraid of buying books Next

14.3. The research pane

The research pane feature of Office 2003 allows you to query a variety of research services on the Web from the task pane, without leaving your document. For example, you could look up word definitions, review stock quotes and information, perform Google searches, check the prices of goods for sale, or find journal articles related to a topic (as shown in Figure 14-6).

Figure 14-6. Using the research pane




You display the research pane by clicking Research on the task pane list. You interact with it by typing your search terms into the Search for: box, selecting a research service, and clicking the green arrow icon. Alternatively, you can press Alt plus a word to query the research service automatically. The research service will return a set of results in the bottom part of the pane.

The research pane can be used with Word, Excel, PowerPoint, Outlook, Publisher and Visio. Unlike smart documents, the research pane does not require your Word documents or Excel workbooks to be associated with a schema; it is independent of the XML editing features of Office.

14.3.1 Available research services

A number of research services are provided with Office 2003. These include dictionaries, thesauri, encyclopedias, language translators, Web searches, and stock quotes. The complete list can be viewed by clicking Research options on the task pane, which brings up the Research Options dialog shown in Figure 14-7.

Figure 14-7. The Research Options dialog




There are additional research services written by third parties that can be added to Office, sometimes for a fee. These services can be found on the Office Marketplace Web site, which can be accessed from the task pane by clicking Get services from Office Marketplace. To add to your available services, click Add services on the Research Options dialog and enter the URL provided by the research service documentation.

You can also write your own research service by implementing it as a SOAP Web service. While the term "research" usually implies accessing public reference sources, the research pane can be used for any information that a user might want to look up.

For example, you could develop a private company-only research service that returns background information on a customer in response to a query using its name or customer number. This would be useful to customer service representatives who are writing letters.

14.3.2 How it works

Research services are implemented as SOAP Web services that are specifically designed to work with the Office research pane. The Web services have two operations: Registration and Query. The Registration operation is performed when a user first adds the research service in Office. The Query operation is performed each time the user looks something up using that service.

A number of parameters may be passed to the Query operation, such as the search text, the preferred language, and the maximum number of items to retrieve. An example of an XML document that might be passed to the Web service is shown in Example 14-12.

Example 14-12. XML document sent to the Query operation
 <QueryPacket xmlns="urn:Microsoft.Search.Query"              revision="1" build="(11.0.5308)">   <Query>     <SupportedFormats>       <Format revision="1"> urn:Microsoft.Search.Response.Document:Document</Format>     </SupportedFormats>     <Context>       <QueryText type="STRING" language="en-us">just-in-time widget manufacturing</QueryText>       <LanguagePreference>en-us</LanguagePreference>     </Context>   </Query> </QueryPacket> 

The research service returns an XML document with the results. The results can be rendered using a variety of techniques, including rich text, images, tables, hyperlinks, horizontal lines, collapsible sections, and even smart tags. An example of the result XML is shown in Example 14-13.[8]

[8] Some information is truncated for legibility.

Example 14-13. XML returned from the Query operation
 <ResponsePacket revision="1" xmlns="urn:Microsoft.Search.Response">   <Response>     <Range>       <StartAt>1</StartAt>       <Count>2</Count>       <TotalAvailable>738</TotalAvailable>       <Results>         <Content xmlns="urn:Microsoft.Search.Response.Content">           <Image source="http://www.elibrary.com/Logo.gif"/>           <Heading collapsible="true">             <Text>Continuous flow manufacturing...</Text>             <P>Microwave Journal... </P>             <Hyperlink url="http://ask.elibrary.com/login.asp...">               <Text>Read now ...</Text>             </Hyperlink>           </Heading>           <Heading collapsible="true">             <Text>Executives try to balance...</Text>             <!-- etc. -->           </Heading>         </Content>       </Results>     </Range>     <Status>SUCCESS</Status>   </Response> </ResponsePacket> 

Tip

For more information on developing custom research services, download the Office Research SDK from the Microsoft website. It provides detailed specifications for the Web services, as well as a number of examples.




Amazon


XML in Office 2003. Information Sharing with Desktop XML
XML in Office 2003: Information Sharing with Desktop XML
ISBN: 013142193X
EAN: 2147483647
Year: 2003
Pages: 176

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net