by Arman Samavatian (3 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 22nd July 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This program checks your spelling of the word.
API Declarations
Microsoft Word Object Library
Option Explicit
Private M As Word.Application
Public Function Dic(ByVal s As String) As Boolean
Dic = M.CheckSpelling(s)
End Function
Private Sub Class_Initialize()
Set M = New Word.Application
End Sub
Private Sub Class_Terminate()
Call M.Quit
Set M = Nothing
End Sub
((( Form )))
Add a textbox and a command button and don't change their name
Option Explicit
Private mCheck As Class1
Private Sub Command1_Click()
If mCheck.Dic(Text1.Text) Then
MsgBox "Your spelling is correct" & vbNewLine & "The word is : " & Text1.Text, vbOKOnly + vbInformation, "Spell Checker"
Else
MsgBox "Your spelling is incorrect" & vbNewLine & Text1.Text & " was not found", vbOKOnly + vbCritical, "Spell Checker"
End If
End Sub
Public Sub Form_Initialize()
Set mCheck = New Class1
End Sub
Private Sub Form_Terminate()
Set mCheck = Nothing
End Sub