Grupy dyskusyjne Google nie obsługują już nowych postów ani subskrypcji z Usenetu. Treści historyczne nadal będą dostępne.

Is there a way to use Word's spell checker in my application?

0 wyświetleń
Przejdź do pierwszej nieodczytanej wiadomości

Doyoung Na

nieprzeczytany,
10 lut 1998, 03:00:0010.02.1998
do

I would like to use the spell checker in my program. Is it possible
if i use OLE Automation? If so, how? Someone please help me.

J. Merrill

nieprzeczytany,
10 lut 1998, 03:00:0010.02.1998
do

I don't think you can do it unless you put your text into a Word
document. Do you want to do that?

If not, there are 3rd-party spell-checkers with Delphi interfaces.

--
- J. Merrill jmerril...@mnsinc.com

Piotr Trzcionkowski

nieprzeczytany,
11 lut 1998, 03:00:0011.02.1998
do

10 Feb 1998 23:04:56 GMT, jmerril...@mnsinc.com (J. Merrill)
wrote:

>I don't think you can do it unless you put your text into a Word
>document. Do you want to do that?
>
>If not, there are 3rd-party spell-checkers with Delphi interfaces.

As I know on DSP is component for using Offiice speller in Delphi
applications.


http://www.cto.us.edu.pl/~trzcionk/

Martin Schayna

nieprzeczytany,
12 lut 1998, 03:00:0012.02.1998
do

Doyoung Na wrote <34E0A99C...@scholarsaid.com>…


>I would like to use the spell checker in my program. Is it possible
>if i use OLE Automation? If so, how? Someone please help me.

Try this for late-binding:

procedure TForm1.Button1Click(Sender: TObject);
var
V: Variant;
begin
V := CreateOleObject('Word.Application');
if not V.CheckSpelling(Memo1.Text) then
ShowMessage('Mistake');
V.Quit;
VarClear(V);
end;

or this for early-binding:
First you must create header unit Word_TLB.pas from file MsWord8.olb, that
comes with Office. From command line type: TLIBIMP MsWord8.olb)

uses Word_TLB;

procedure TForm1.Button1Click(Sender: TObject);
var
// Don't confuse this with Delphi Application variable.
// TLIBIMP changes this name from Application for conflict.
A: _Application;
N: OleVariant;
begin
A := CoApplication.Create;
// or A := CreateComObject(Class_Application) as _Application;
VarClear(N);
if not A.CheckSpelling(Memo1.Text, N, N, N, N, N, N, N, N, N, N, N, N)
then
ShowMessage('Mistake');
VarClear(N);
A.Quit(N, N, N);
A := nil;
end;

Hope this helps
Bye

Martin Schayna
msch...@aktis.cz


Nowe wiadomości: 0