Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Par2: Inheriting and using MS Word Dictionary and Spell Checker 2000-05-12 -- Oleg Chernov > Has anyone tried to inherit the Microsoft Office Spell Checker and
> Dictionary into their app?
> We'd like to use the spell checker from Office to check text boxes on my
> app's forms.
> Does anyone know if this is possible, and if so is there a template or
third
> party add-on to do so?
>
> Some sample code would also be appreciated :-)
> TIA
It's easy using Ole Automation
Look on this example:
Declare two variables:
WordObject long
CheckString string(1000) ! string for CheckSpelling
Code
! create temporary Ole Control
WordObject = create(0,prop:ole)
! Create MS Word Document Object
WordObject{prop:create}='Word.Document'
! Hidden Word Window
WordObject{'Application.Visible'}=False
! Copy checkString into Word
WordObject{'Application.Selection.Text'}=CheckString
! start CheckSpelling
WordObject{'Application.ActiveDocument.CheckSpelling'}
! Copy CheckString back
CheckString = WordObject{'Application.Selection.Text'}
! close document and Quit from MsWord
WordObject{'close'}
WordObject{'Application.Quit'}
WordObject{prop:deactivate}
Destroy(WordObject}
Today is November 21, 2024, 7:06 am This article has been viewed 35211 times.
|
|