WD2002: Word Stops Responding When You Use CheckSpelling or GetSpellingSuggestions Methods (286846)



The information in this article applies to:

  • Microsoft Word 2002

This article was previously published under Q286846

SYMPTOMS

When you use a spelling checker method in a Microsoft Visual Basic for Applications macro, Microsoft Word may stop responding or display the following error message:
Microsoft Word has encountered a problem and needs to close. We are sorry for the inconvenience.
To view the details of the error signature, click the link in To see what data this error report contains, click here in the error dialog box. The following error signature appears:
AppName         AppVer          ModName       ModVer        Offset
---------------------------------------------------------------------
winword.exe     10.0.4009.0     winword.exe   10.0.4009.0   008c2a25
				

CAUSE

This behavior can occur if all of the following conditions are true:
  • You use the CheckSpelling or GetSpellingSuggestions methods.

    -and-
  • You specify a custom dictionary.

    -and-
  • You specify a main dictionary, and the dictionary for that language is not installed on your computer.

WORKAROUND

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals 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 needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site: For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site: To work around this issue, programmatically check to see if the dictionary is installed before using the CheckSpelling or GetSpellingSuggestions methods. The following sample code shows one way to determine if the dictionary is installed:
Sub CheckDictionary()

   LanguageName = "Bengali"
   lngLanguage = Languages(LanguageName).ID

   'Get the language ID number
   Set dicSpelling = Languages(lngLanguage).ActiveSpellingDictionary
    
   If dicSpelling Is Nothing Then
      MsgBox "No spelling dictionary installed!"
   Else
   'If the dictionary is installed, spellcheck the text.
      MsgBox Application.CheckSpelling("bein", _
         CustomDictionary:="custom.dic", MainDictionary:=LanguageName)
   End If

End Sub
				

STATUS

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

MORE INFORMATION

For more information about proofing tools in other languages, click Microsoft Word Help on the Help menu, type different language dictionary in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbbug kberrmsg kbpending KB286846