Programming MicrosoftВ® OutlookВ® and Microsoft Exchange 2003, Third Edition (Pro-Developer)
Internet Explorer does not support smart tags out of the box, but you can add custom markup to an HTML document to support smart tags on your Web pages. For this technique to work, you need to make sure that smart tag behavior for Internet Explorer is installed. (The IE smart tag behavior comes with Office.) The following HTML markup shows how to tag HTML documents with smart tags:
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:categories = "trainingapp#categories"> <HEAD> <TITLE>Smart Tag Sample</TITLE> <o:SmartTagType name="category" namespaceuri="trainingapp#categories" downloadurl="http://trainingapp"> </o:SmartTagType> <OBJECT classid ="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui> </OBJECT> <STYLE> categories\:* {BEHAVIOR: url(#ieooui)} </STYLE> </HEAD> <BODY> <categories:category>Developers</categories:category> develop on Office XP. </BODY> </HTML>
In the code, you specify the XML namespace for Office and the namespace for your smart tag. Then you declare your smart tag element type. In this case, the element name is category , the namespace is trainingapp#categories , and a downloadurl is specified for any new actions. The next step is to declare an object tag for the IETag factory that enables Internet Explorer to label smart tags. Then you declare a behavior that uses the object you just declared for HTML elements of a certain type. The last step is actually to write your HTML and tag some elements as the specific type you declared in your behavior. Figure 9-7 shows Internet Explorer running the previous HTML page.