If not, there are 3rd-party spell-checkers with Delphi interfaces.
--
- J. Merrill jmerril...@mnsinc.com
>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.
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