Article ID: 115166
Article Last Modified on 2/27/2007
Sub Form_Load()
Command1.Caption = "Press to Spell Check"
Text1.Text = "The Seattle SuperSonics ar goig all the wa this yeer!"
End Sub
Sub Command1_Click ()
Dim oWDBasic As Object
Dim sTmpString As String
Set oWDBasic = CreateObject("Word.Basic")
oWDBasic.FileNew
oWDBasic.Insert Text1.Text
On Error Resume Next
oWDBasic.ToolsSpelling
oWDBasic.EditSelectAll
oWDBasic.SetDocumentVar "MyVar", oWDBasic.Selection
sTmpString = oWDBasic.GetDocumentVar("MyVar")
Text1.Text = Left(sTmpString, Len(sTmpString) - 1
MsgBox "Spell Check is complete"
End Sub
SuperSonics (Ignore)
ar (Change to are)
goig (Change to going)
wa (Change to way)
yeer (Change to year)
The Seattle SuperSonics are going all the way this year!
Additional query words: 1.00 6.00
Keywords: KB115166