Running and Testing the Application-Level Smart Tag


Now launch Word or Excel to test the Smart Tag. Type text such as PN1234 in Word or in an Excel cell. You will see that a Smart Tag appears. Click the Smart Tag indicator, and the menu shown in Figure 16.9 will display. Note that because of the strings we returned from VerbCaptionFromID, a Part Number menu is shown with two submenus for our two verbs. Also note the accelerators (indicated by an underlined letter in the menu caption) that were created because of the use of the ampersand (&) character in the strings returned from VerbCaptionFromID.

Figure 16.9. The two verbs for the part number Smart Tag.


In addition, you can see the Smart Tag listed in the Smart Tags tab of the AutoCorrect dialog box, as shown in Figure 16.10. To bring up this dialog box in Word, choose AutoCorrect Options from the Tools menu. The part number Smart Tag is in the list of Recognizers with the string returned from the SmartTagCaption (Part Number Smart Tag) and, in parentheses, the string returned from Name (English).

Figure 16.10. The Part Number Smart Tag displayed in the Smart Tags tab.





Visual Studio Tools for Office(c) Using Visual Basic 2005 with Excel, Word, Outlook, and InfoPath
Visual Studio Tools for Office: Using Visual Basic 2005 with Excel, Word, Outlook, and InfoPath
ISBN: 0321411757
EAN: 2147483647
Year: N/A
Pages: 221

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net