Не работает функция CheckSpelling из MS Word'а
От: Trapper  
Дата: 19.12.03 07:39
Оценка:
Возник вопрос при использовании этой функции! Делаю так:

CApplication app;
 
app.CreateDispatch("Word.Application");
 
VARIANT varOpt;
varOpt.vt = VT_ERROR;
varOpt.scode = DISP_E_PARAMNOTFOUND; 
 
result = app.CheckSpelling("Check for errors", &varOpt,&varOpt,&varOpt,&varOpt,&varOpt,&varOpt,
&varOpt,&varOpt,&varOpt,&varOpt,&varOpt,&varOpt);

Всё проходит нормально, а вот при вызове app.CheckSpelling вылетает исключение и надпись о том, что не найдены файлы mssp232.dll и mssp3RU.dll. У меня этих файлов действительно нет, но проверка орфографии в ворде работает и без них. В чём может быть дело?
Trapper
Re: Не работает функция CheckSpelling из MS Word'а
От: KGP http://kornilow.newmail.ru
Дата: 19.12.03 08:18
Оценка:
Здравствуйте, Trapper, Вы писали:

T>Всё проходит нормально, а вот при вызове app.CheckSpelling вылетает исключение и надпись о том, что не найдены файлы mssp232.dll и mssp3RU.dll. У меня этих файлов действительно нет, но проверка орфографии в ворде работает и без них. В чём может быть дело?


Сорри за неперевод Из MSDN:
This enables other Microsoft programs to use the Microsoft Word spelling engine (MSSP232.DLL) and dictionary (MSSP2_EN.LEX) because they are more robust than the other spelling engine and dictionary (MSSP32.DLL and MSSP_AM.LEX).

Так что MSSP232.DLL — и есть Microsoft Word spelling engine

Должны быть в
Program Files\Common Files\Microsoft Mssp232.Dll
Shared\Proof
Program Files\Common Files\Microsoft Mssp2_En.Lex
Shared\Proof

Смотри и ещё есть проблемы — путь к ним храниться в реестре ...

1) These error messages occur when the spelling checker file (MSSP232.DLL) is installed in a location referenced by a path that is longer than 127 characters.
2) NOTE: This article assumes that the Regional Settings in Control Panel is set to English (United States). If the regional setting is a different English version, such as English (British), this information still applies. However, you may need to substitute any references to the American English dictionary file (MSSP_AM.LEX) in the discussion below with the British English dictionary file (MSSP_BR.LEX).

When you install a Microsoft program and include the spelling checker, the Setup program copies a spelling engine (.DLL) and a dictionary file (.LEX) to a common folder on your computer:

C:\Program Files\Common Files\Microsoft Shared\Proof
This folder may contain two versions of the spelling checker because Microsoft programs can install different spelling engines and dictionary files. For example, Microsoft Word, Microsoft Publisher, and Microsoft Office install the following spelling checker files:

Engine: MSSP232.DLL
Dictionary: MSSP2_EN.LEX
Microsoft Excel, Microsoft Project, Microsoft PowerPoint, and Microsoft Access install these different spelling checker files:

Engine: MSSP32.DLL
Dictionary: MSSP_AM.LEX
To have two versions of the spelling checker usually does not cause a problem because the Windows Registry keeps track of only one main engine and dictionary. The Registry stores a Spelling key with an Engine value and a Dictionary value under the following entry:
[\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Shared Tools\Proofing Tools\Spelling\1033\Normal]
If the spelling checker in Microsoft Word (also included with Microsoft Office and Microsoft Publisher) is installed at the time that you set up other Microsoft programs, the Registry's Engine and Dictionary values are not changed. This enables other Microsoft programs to use the Microsoft Word spelling engine (MSSP232.DLL) and dictionary (MSSP2_EN.LEX) because they are more robust than the other spelling engine and dictionary (MSSP32.DLL and MSSP_AM.LEX).

There is an exception, however, when Microsoft Access is the most recently installed program. If the Microsoft Word spelling checker is installed at the time that you set up Microsoft Access, and the MSSP_AM.LEX file is already installed, the Setup program updates the Registry incorrectly. The Setup program changes the Dictionary value to refer to the Microsoft Access dictionary file (MSSP_AM.LEX) but does not change the Engine value; it still refers to the other spelling engine (MSSP232.DLL). This means that the Registry has mismatched settings for the spelling engine and dictionary values and prevents the spelling checker from running in various Microsoft programs.

Additional query words: spell check word7 word95
... << RSDN@Home 1.1.0 stable >>
Re[2]: Не работает функция CheckSpelling из MS Word'а
От: Trapper  
Дата: 19.12.03 08:29
Оценка:
Большое спасибо, буду разбираться
Trapper
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.