Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Spell checking a memo 2000-06-08 -- Ray Dummer !Declare two variables:
WordObject long
CheckString string(1000)
! string for CheckSpelling
!Embed point where you want to check the spelling
WordObject=create(0,create:ole) ! create temporary
Ole Control
WordObject{prop:create}='Word.Document' ! Create MS Word
Document Object
WordObject{'Application.Visible'}=False ! Hidden Word Window
WordObject{'Application.Documents.Add'} ! Create new
document
WordObject{'Application.Selection.Text'}=CheckString ! Copy checkString
into Word
WordObject{'Application.ActiveDocument.CheckSpelling'} ! start
CheckSpelling
CheckString = WordObject{'Application.Selection.Text'} ! Copy CheckString
back
WordObject{'Application.ActiveWindow.WindowState'}=2 ! close document and
Quit from MsWord
WordObject{'Application.ActiveDocument.Close(0)'} ! Closing without
save
WordObject{'close'}
WordObject{'Application.Quit'}
WordObject{prop:deactivate}
Destroy(WordObject)
Today is November 21, 2024, 3:39 am This article has been viewed 35330 times.
|
|