Spell check slowness issue in our application for spell check fields, when MS Word 2010 is installed along with our application. RRS feed

  • Question

  • Hello,

    We have an application developed in Delphi 5 and we are using spell check in some of the fields in the application. This application is basically developed for doctors and physicians. There is a standard dictionary Stedman's Medical Dictionary, that our clients use for all medical terms which MS Word can recognize.

    When our clients install MS Word 2007 with our application, all the spell check fields work properly. Where as when they install MS Word 2010, all the spell check fields start responding very slow. When user types something in those fields, 1 character takes approx 1 second to show up.

    Is this a known issue? Any help will be greatly appreciated.

    Thank you,


    Tuesday, September 23, 2014 12:57 PM

All replies

  • Where do spell checkers come from? How Word is related to your application? 
    Tuesday, September 23, 2014 2:14 PM
  • Hello Eugene,

    We have created some custom controls in Delphi 5 "TMSWordSpellChecker". This control invokes the MS Word to do the spell check in our application.

    In our application MS Word is mainly used to edit a person's medical report.  We have developed Word Add-ins to save the edited data in the application database. 

    The below code talks with the MS Word to do the spell check:

    function TMSWordSpellChecker.GetWordApplication(ANewInstance: Boolean = False): WordApplication;
      Result := nil;
      if FLocalWordApplication <> nil then
        Result := FLocalWordApplication.Application;
        FLocalWordApplication := nil;

      // Only execute teh following block if we have previously created our own instance of word
      if SpellCheckWordApp <> nil then
        if ANewInstance then
          // If we are trying to get a new instance the try to close the old instance
          // Checks to make sure that our interface to MS Word is still valid
          Result := SpellCheckWordApp.Application;
          SpellCheckWordApp := nil;

      if ANewInstance or not Succeeded(GetRunningInstanceOfWord(Result)) then
          Result := SpellCheckWordApp;

    Please let me know if any other information is required.

    Tuesday, September 23, 2014 3:38 PM
  • Did you try to debug the code? What method or property takes too much time for running?

    Did you try to run the spell checker manually in Word? Does it take much time to complete the operation?

    Tuesday, September 23, 2014 5:08 PM
  • Hello Eugene,<o:p></o:p>

    Yes I tried debugging the code, but I did not observer any delay happening at code level.<o:p></o:p>

    I also ran the spell checker manually in Word, but there is not delay. Delay happens only for the spell check fields in our application.<o:p></o:p>

    I would like to add one more point here, this delay does not occur when Word uses the Custom.dic file for spell check. It occurs when our clients integrate another dictionary called Stedman's Medical Dictionary with Word. This integration adds a dictionary file along with Custom.dic under Proofing setting of Word. I am trying to insert a screen capture of Proofing settings, but MSDN is not allowing me to do so. 

    Also, The strange thing here is, when we use MS Word 2007 instead of MS Word 2010, we do not observe any delay in our application with the same Proofing settings. That's where I am wondering if something has been changed from MS Word 2007 to MS Word 2010 which is causing this slowness.

    Please let me know if you need more information.


    Wednesday, September 24, 2014 7:14 AM
  • Yogesh,

    Are you able to reproduce the issue with a custom dictionary and Word without your application? Do you see any delay?

    Wednesday, September 24, 2014 7:42 AM
  • Hello Eugene,

    No. The issue occurs only in our application.

    Wednesday, September 24, 2014 8:29 AM
  • Also, if I remove the Stedman's Dictionary from MS Word 2010 in my system, the delay goes off.

    Where as in another system where I have MS Word 2007, Everything works fine when I use the same Stedman's Dictionary, I do not see any delay.

    Wednesday, September 24, 2014 8:32 AM
  • Eugene,

    There is one more thing here what I want to add is, this issue goes away even if we have installed MS Word 2010 with our application. To overcome with this issue, we have to open a blank Word document or any Word document. We have suggested our clients that as a workaround. When we keep a blank Word document/any Word document open, we don't see any slowness in spell check. As soon as we close Word document, this issue happens again.

    Wednesday, September 24, 2014 8:44 AM