Check spelling!
Check spelling!
Rate Check spelling!
(2(2 Vote))
'Uses Microsoft Word Spelling Dictionary to check a spelling!
'Test this by using wrong spelling for Word as Worud
'Usage: Call chkit("Test Worud")
Function Chkit(strWord As String) As String
Dim msWord As Object
Dim strSelection As String
Set msWord = CreateObject("Word.Basic")
msWord.AppMinimize
Chkit = strWord
msWord.FileNewDefault
msWord.EditSelectAll
msWord.EditCut
msWord.Insert strWord
msWord.StartOfDocument
On Error Resume Next
msWord.ToolsSpelling
On Error GoTo 0
msWord.EditSelectAll
strSelection = msWord.Selection$
If Mid(strSelection, Len(strSelection), 1) = Chr(13) Then
strSelection = Mid(strSelection, 1, Len(strSelection) - 1)
End If
If Len(strSelection) > 1 Then
Chkit = strSelection
End If
msWord.FileCloseAll 2
msWord.AppClose
Set msWord = Nothing
End Function
Check spelling! Comments
No comments yet — be the first to post one!
Post a Comment