Implementing Your Own Smart Tags

Office smart tags procedurally work like this: As a user types in an open document, the text is “tokenized” and then compared to all the terms/expressions that any of the smart tags in Office recognize. If the text is recognized by a smart tag, a list of actions is provided to the user (and displayed using the UI described previously when we first introduced the smart tag concept). So we have two parts to the process: recognition and action.

Using VSTO, you can create your own smart tags that define which text the tags recognize, and define the list of possible action items that are presented on recognition to the user.

Both Word and Excel implement classes that derive from the Microsoft.Office.Tools.SmartTagBase ...

Get Microsoft® Visual Studio® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.