Article ID: 132185
Article Last Modified on 11/6/2000
Option Explicit
Sub SpellCheck_Click ()
On Error GoTo SpellCheck_Err
Dim WordObj As Object
' Set the object variable to the form's embedded OLE control.
Set WordObj = Me![MyOle].Object.Application.WordBasic
' Activate the embedded control.
MyOle.Action = 7
' Specify a WordBasic function to perform.
WordObj.ToolsSpelling
' Deactivate the embedded control.
MyOle.Action = 9
Exit Sub
SpellCheck_Err:
If Err = 2763 Then
MsgBox "The Spell Check is Complete."
Resume Next
End If
End Sub
Sub GrammarCheck_Click ()
On Error GoTo GrammarCheck_Err
Dim WordObj As Object
' Set the object variable to the form's embedded OLE control.
Set WordObj = Me![MyOle].Object.Application.WordBasic
' Activate the embedded control.
MyOle.Action = 7
' Specify a WordBasic function to perform.
WordObj.ToolsGrammar
'Deactivate the embedded control.
MyOle.Action = 9
Exit Sub
GrammarCheck_Err:
If Err = 2763 Then
MsgBox "The Grammar Check is Complete."
Resume Next
End If
End Sub
Microsoft Word returned the following error:
Microsoft Word - The spelling check is complete.
Additional query words: Word.Basic documents embedding linking
Keywords: kbinfo KB132185