BUG: Smart Tag DLL Receives Error When Calling CommitSmartTag (297704)



The information in this article applies to:

  • Microsoft Office XP Developer
  • Microsoft Word 2002
  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual C++, 32-bit Professional Edition 6.0

This article was previously published under Q297704

SYMPTOMS

When you call the CommitSmartTag method in a Smart Tag dynamic-link library (DLL), you may receive the following error message:
Run-time error '-2147467259 (80004005)':
Method 'CommitSmartTag' of object 'ISmartTagRecognizerSite' failed

CAUSE

This error occurs when the Recognize method is called to recognize text and the CommitSmartTag method has not executed before more text is typed into Word.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Compile the SimpleTerm Visual Basic sample that ships with the Smart Tag Software Development Kit (SDK).
  2. Verify that the Smart Tag DLL is correctly registered for Office.
  3. In the Visual Basic code, place a breakpoint on the line that calls the CommitSmartTag method.
  4. In the project debugging options, verify that Wait for component to be created is selected and then press F5 to debug the application.
  5. Start a new document in Word.

    NOTE: On the Tools menu, select Macro and then click Security. If your security setting is set to High, change it to Medium or Low and restart Word.
  6. Type the word java in the new document and press ENTER. You should break in the Visual Basic code on the CommitSmartTag line.
  7. While on this breakpoint, switch back to Word and type latte on the same line as the word java and then press ENTER.
  8. Switch back to the Visual Basic debugger and press F8 to step over the CommitSmartTag method. The runtime error occurs.

REFERENCES

For more information on creating custom Smart Tag Recognizer/Action DLLs, see the Smart Tag Development Help file included with Smart Tag SDK. You can obtain the Smart Tag SDK from the Microsoft Office XP Developer (MOD) CD-ROM, or you can download it from the following Microsoft Developer Network (MSDN) Web site:

Modification Type:MajorLast Reviewed:4/13/2006
Keywords:kbbug KB297704