Appendix C

Introduction to Using and Programming Smart Tags

When you enter certain text into a Microsoft Excel 2002 spreadsheet cell, you may notice a small purple triangle that appears in the lower-right corner of that cell. This feature is a result of a new technology called smart tags that was introduced in Office XP When you move your mouse pointer over the text that has been tagged, you will see a button representing a circle with a lowercase "i" inside it. When clicked, this Smart Tag button displays a list of available actions that are relevant to the marked text (Figure C-1).

Figure C-1:

A custom smart tag implemented in the Microsoft Excel 2002 worksheet

Figure C-1:

A custom smart tag implemented in the Microsoft Excel 2002 worksheet

The purpose of smart tags is to recognize frequently accessed data, such as stock symbols, zip codes, customer names, part numbers, dates, and so on, and make it easy for users to perform actions on those pieces of data regardless of what application they are currently using. For example, a smart tag could check warranty information on a specific part number entered in a spreadsheet or check prices on specific products. Or, it could retrieve flight information when an airline and flight number are recognized.

With the implementation of smart tag technology, your spreadsheet applications can become more intelligent and user friendly. Users will no longer need to manually launch other applications, as smart tags can return data from any data source or open a browser and navigate to a web siteā€”all automatically. In summary, smart tags allow you to eliminate extra steps that you would normally have to take to perform a certain action.

At this point, you are probably anxious to get started. So, how can you create your own smart tags? There are two ways to develop smart tags. If you studied Chapter 17 of this book, you already have the necessary skills to develop some simple smart tags. This approach requires that you are familiar with the Extensible Markup Language (XML). With XML, you can define a set of terms that smart tags will recognize and create a list of actions to display whenever a term from the list is encountered in a worksheet or another Microsoft Office XP document. This approach is very limited, as it allows you to only use web-based actions (more about this later). If you require more dynamic and powerful smart tags, you must develop ActiveX DLLs (dynamic-link libraries) using development environment tools provided within Microsoft Visual Basic 6.0 or Microsoft Visual C++.

Smart tags are currently available for Microsoft Excel 2002, Microsoft Word 2002, Microsoft Outlook 2002 (when Word 2002 is used as an e-mail editor), and Internet Explorer. This appendix expands your knowledge of XML by showing you how to get started creating smart tag lists. If you are interested in learning more about developing your own smart tags (using either the XML or DLL approach), download a free Smart Tags software development kit (SDK) provided by Microsoft (http://msdn.microsoft.com).

0 0

Post a comment