OFFXP: How to Create a Microsoft Office Smart Tag List

Article translations Article translations
Article ID: 287698 - View products that this article applies to.
This article was previously published under Q287698
Expand all | Collapse all

On This Page

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

<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.
  1. Select all of the preceding code, and copy the selection.
  2. Open Notepad.
  3. Paste the code into a new Notepad file.
  4. On the File menu, select Save As.
  5. In the Save As dialog box, browse to the following folder:
    C:\Program Files\Common Files\Microsoft Shared\Smart Tag\Lists
  6. 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.
  7. Start Microsoft Excel 2002 or Microsoft Word 2002.
  8. On the Tools menu, click AutoCorrect Options, and then click the Smart Tags tab.
  9. 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.
  10. In the open spreadsheet or document, type Seattle. Notice the smart tag indicator that appears.
  11. 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:
http://www.microsoft.com/downloads/details.aspx?familyid=3d8edcee-0246-43ef-a70f-94c0899f1e8f&displaylang=en

Properties

Article ID: 287698 - Last Review: January 31, 2007 - Revision: 6.2
APPLIES TO
  • Microsoft Excel 2002 Standard Edition
  • Microsoft Word 2002 Standard Edition
Keywords: 
kbhowto KB287698

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com