VSTO's document-level Smart Tags are great when you want to recognize a term in a particular document or a class of document created from a template. What are your options when you want to recognize a term in all open documents? You can control the text that Word or Excel recognizes at an application level and the actions made available for that text by creating a Smart Tag DLL. A Smart Tag DLL contains two types of classes that are used by Office: a recognizer class and an action class. A recognizer class tells Office the text in the workbook to recognize. The recognizer class "tags" recognized text by creating a property bageven an empty property bagand attaching it to recognized text. An action class corresponds to an action displayed in the pop-up menu that Office displays when a user hovers over a recognized piece of text. Recognizer classes implement the ISmartTagRecognizer interface and optionally the ISmartTagRecognizer2 interface. Action classes implement the ISmartTagAction interface and optionally the ISmartTagAction2 interface. |