Word Smart Tags Sample
This sample runs only in Microsoft Office Word 2007.
This sample demonstrates how you can incorporate smart tags into a document-level solution for Word. For more information about smart tags in Visual Studio Tools for Office projects, 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.
This sample code is intended to illustrate a concept, and it shows only the code that is relevant to that concept. It may not meet the security requirements for a specific environment, and it should not be used exactly as shown. We recommend that you add security and error-handling code to make your projects more secure and robust. Microsoft provides this sample code "AS IS" with no warranties.
To run this sample
Move the pointer over text that is underlined, click the smart tag icon, and then click an action on the shortcut menu.
Type a temperature in the Enter temperature to convert box, and then press ENTER.