Microsoft KB Archive/287698

= OFFXP: How to Create a Microsoft Office Smart Tag List =

Article ID: 287698

Article Last Modified on 1/31/2007

-

APPLIES TO


 * Microsoft Excel 2002 Standard Edition
 * Microsoft Word 2002 Standard Edition

-



This article was previously published under Q287698



SUMMARY
You can create custom smart tags for use in Microsoft Office XP by using Extensible Markup Language (XML). Smart tags created in this way are called Smart Tag Lists. These Smart Tag Lists can only recognize a static list of terms and make use of Web-based actions.

This article contains a sample of the XML code that is needed to create a Smart Tag List.



MORE INFORMATION
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
 MSN City Lookup 1033,0 Looks up City Guides on MSN false 10080 true <FL:smarttag type=&quot;urn:schemas-microsoft-com:office:smarttags#CityGuide&quot;> <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=&quot;CityGuidLookup&quot;> <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. <ol> <li>Select all of the preceding code, and copy the selection.</li> <li>Open Notepad.</li> <li>Paste the code into a new Notepad file.</li> <li>On the File menu, select Save As.</li> <li>In the Save As dialog box, browse to the following folder:

C:\Program Files\Common Files\Microsoft Shared\Smart Tag\Lists

</li> <li>Save the file in this folder as &quot;CityGuide.XML&quot;

NOTE The quotation marks around the file name are required to ensure that a .txt extension is not added to the file name.</li> <li>Start Microsoft Excel 2002 or Microsoft Word 2002.</li> <li>On the Tools menu, click AutoCorrect Options, and then click the Smart Tags tab.</li> <li>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.</li> <li>In the open spreadsheet or document, type Seattle. Notice the smart tag indicator that appears.</li> <li>Click the Smart Tag button, and then select Lookup MSN City Guide.</li></ol>

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:

http://www.microsoft.com/downloads/details.aspx?familyid=3d8edcee-0246-43ef-a70f-94c0899f1e8f&displaylang=en

Additional query words: MOSTL

Keywords: kbhowto KB287698

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.