Article ID: 147818
Article Last Modified on 2/21/2005
Private Sub Form_Load()
Command1.Caption = "Press to SpellCheck"
Text1.Text = "The Seattle Mariners ar goig all the wa this yeer!!"
End Sub
Private 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
Mariners(Ignore) ar(Change to are) goig(Change to going) wa(Change to way) yeer(Change to year)After the last correction, you will get a Message box telling you that the spell check is complete. The results inserted back into the Text1 text box should say this:
The Seattle Mariners are going all the way this year!!
Keywords: kbhowto kbnoupdate kb16bitonly KB147818