Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Sample XML Code to Create a Smart Tag List
<FL:smarttaglist xmlns:FL="urn:schemas-microsoft-com:smarttags:list">
<FL:name>MSN City Lookup</FL:name>
<FL:lcid>1033,0</FL:lcid>
<FL:description>Looks up City Guides on MSN</FL:description>
<FL:updateable>false</FL:updateable>
<FL:updatefrequency>10080</FL:updatefrequency>
<FL:autoupdate>true</FL:autoupdate>
<FL:smarttag type="urn:schemas-microsoft-com:office:smarttags#CityGuide">
<FL:caption>MSN City</FL:caption>
<FL:terms>
<FL:termlist>Atlanta,Austin,Boston,Chicago,Dallas,Denver,Detroit,Miami,Philadelphia,Phoenix,Seattle</FL:termlist>
</FL:terms>
<FL:actions>
<FL:action id="CityGuidLookup">
<FL:caption>Lookup MSN City Guide</FL:caption>
<FL:url>http://{TEXT}.msn.com</FL:url>
</FL:action>
</FL:actions>
</FL:smarttag>
</FL:smarttaglist>
To use the preceding code, follow these steps.
NOTE: Close all Microsoft Office XP programs first.
- Select all of the preceding code, and copy the selection.
- Open Notepad.
- Paste the code into a new Notepad file.
- On the File menu, select Save As.
- In the Save As dialog box, browse to the following folder:
C:\Program Files\Common Files\Microsoft Shared\Smart Tag\Lists
- Save the file in this folder as "CityGuide.XML"
NOTE The quotation marks around the file name are required to ensure that a .txt extension is not added to the file name. - Start Microsoft Excel 2002 or Microsoft Word 2002.
- On the Tools menu, click AutoCorrect Options, and then click the Smart Tags tab.
- In Excel, verify that the Label data with smart tags check box is selected. In Word, verify that the Label text with smart tags check box is selected. In both programs, verify that the Smart tag lists check box is selected in the Recognizers List. Click OK to close the dialog box.
- In the open spreadsheet or document, type Seattle. Notice the smart tag indicator that appears.
- Click the Smart Tag button, and then select Lookup MSN City Guide.
Smart Tag Lists created with XML do not require you to compile a DLL. Instead, they use the Mofl.dll file that is included with Microsoft Office XP. This means that all Smart Tag Lists are turned on or off as a group in the
Smart Tag Options dialog box.
For more information about creating smart tags, refer to the Microsoft Smart Tag Software Developer's Kit at the following Microsoft Web site: