Running the Code

1. Press F5 to run the code.

2. On the Tools menu, click AutoCorrect Options and ensure that the Offline Example check box is selected on the Smart Tags tab, as shown in Figure 9.17.

Figure 9.17. Enabling Word to recognize the Offline Example custom smart tag

3. With your computer connected to the Internet, add the following text to the document: This is an example of a SmartTag and an ActionsPane.

4. The control names should be recognized and marked with a dotted line. When you move your cursor over the term, the Smart Tags Action button should appear, as shown in Figure 9.18.

5. Click the drop-down button and select an action. If the computer is online, the caption will read "Windows Live Search," as shown in Figure 9.18.

Figure 9.18. Recognizing terms and adding smart tags

6. When you click the Windows Live Search action, search results are displayed in the actions pane, as shown in Figure 9.19.

ÏQ^H^I^^I^iàl^^^i^l^'^'I^L^ffl^ii^l^Iir 150% - fflRead]

Document Actions

SmartTag Interface ("Microsoft,Office,Interop.Word1) Represents a string in a document or range that contains recognized type information, ... Represents a string in a document or range that contains recognized type information, msdn2.microsoft.com/de-de/library/ microsoft, office, interop, word.smarttag.aspx ■ Cached oaae

SmartTaa Interface (Microsoft.Office.Interop,Word")

Represents a string in a document or range that contains recognized type information, ,.. Represents a string in a document or range that contains recognized type information.

msdn2. microsoft.com/zh-CN/library/

microsoft.office.interop.word.smarttaq,asps ■ Cached oaae

+Show more results from "msdn2.microsoft.com",

-

File Edit View Insert Format lools Table Window Help

Type a question for help

! Final Showing Markup - Show

44 Normal t Times New Roman ▼ 12 * B I U = m - | j= j= | El *

'-A-I fe

LtJ

■ ■ 5 ■ ■ ■ 1 ■ ■ ■ JB

This is an example of a SmartTag and an ActionsPane. |

=

Q S ~ V <

1

Page 1 Sec 1 1/1 At 1" Ln 1 Col 54 REC TRK EXT OVR

Figure 9.19. Viewing search results via a smart tag

0 0

Post a comment