Microsoft KB Archive/297704

= BUG: Smart Tag DLL Receives Error When Calling CommitSmartTag =

Article ID: 297704

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Office XP Developer Edition
 * Microsoft Word 2002 Standard Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Professional Edition

-



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.



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.
 * 1) Type the word java in the new document and press ENTER. You should break in the Visual Basic code on the CommitSmartTag line.
 * 2) While on this breakpoint, switch back to Word and type latte on the same line as the word java and then press ENTER.
 * 3) Switch back to the Visual Basic debugger and press F8 to step over the CommitSmartTag method. The runtime error occurs.

