Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Compiler error when implementing the ISmartTagAction interface or the ISmartTagRecognizer interface in a Visual Basic project


View products that this article applies to.

This article was previously published under Q282145

↑ Back to the top


Symptoms

When you compile a Visual Basic project that uses the ISmartTagAction and ISmartTagRecognizer interfaces, you receive unexpected error messages. This problem occurs when your Visual Basic project includes references to the Microsoft Smart Tags 1.0 Type Library and one or more of the following object libraries:
  • Microsoft Excel 12.0 Object Library
  • Microsoft Excel 11.0 Object Library
  • Microsoft Excel 10.0 Object Library

↑ Back to the top


Cause

The Excel object libraries and the Microsoft Smart Tags 1.0 Type Library both include interfaces named ISmartTagAction and ISmartTagRecognizer. If your project references both of these libraries and you implement the interface without fully qualifying the interface name, the compiler attempts to use the first matching interface that it encounters in the project's list of references. If the compiler does not choose the type library you intend to use, a compiler error can occur.

↑ Back to the top


Resolution

To correct this problem, fully qualify the interface name in your Implements statement. To implement ISmartTagRecognizer in the Smart Tags library, use the following:
Implements SmartTagLib.ISmartTagRecognizer
				
Full qualification ensures that the compiler uses a specific type library and does not rely on the order of project references.

↑ Back to the top


References

For more information about using the Implements statement, see the following Microsoft Developer Network (MSDN) Web site:
Visual Basic for Applications Reference:
http://msdn2.microsoft.com/en-us/library/aa243384(VS.60).aspx

↑ Back to the top


Keywords: KB282145, kbprb, kbpending, kbcompiler, kbexpertiseinter

↑ Back to the top

Article Info
Article ID : 282145
Revision : 5
Created on : 5/24/2007
Published on : 5/24/2007
Exists online : False
Views : 380