This topic has not yet been rated - Rate this topic

Excel Smart Tags Sample

Download sample

Note Required applications

The features in this topic are available only if you have the required applications installed.

For more information, see Features Available by Product Combination.

  • One of these development environments:

    VSTO 2005

    -or-

    Visual Studio Team System

  • Microsoft Office 2003

This sample demonstrates how you can incorporate smart tags into your Microsoft Office Excel 2003 solution. For more information about smart tags in Excel, see Smart Tags Overview.

This sample contains two smart tags. The first smart tag uses term-based recognition to convert airport codes to airport names. The second smart tag uses regular expressions to recognize and convert temperatures between Celsius and Fahrenheit.

Security noteSecurity Note

This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

For information about installing the sample project on your computer, see How to: Download Sample Files in Help Topics.

To run this sample

  1. Press F5.

  2. Move the pointer over text that is underlined, click the smart tag icon, and then click an action in the shortcut menu.

  3. Type a temperature in the Enter temperature to convert box and then press ENTER.

Demonstrates

  • How to add a smart tag to a document.

  • How to recognize string literals in a smart tag.

  • How to recognize regular expressions in a smart tag.

  • How to implement actions for a smart tag.

  • How to change the action menu item based on the recognized text.

See Also

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ