Visual Studio Tools for Office: Using Visual Basic 2005 with Excel, Word, Outlook, and InfoPath
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.
|
Категории