Execl Check Spell

  • Thread starter Thread starter Char_dhami
  • Start date Start date
C

Char_dhami

I would like to do a Spell check on Column "A" and Get the Suggested
Word in the Column "B" if is is not the right word.
Using VBA. Or somthing like AutoSpell Check (I.e) in case of Word.


Thanks
Char
 
This si what I want for excel But this one is for Access.

Thanks,
Charles
Public Function SCSuggestSpelling()

Dim wdApp As Word.Application
Dim mdoc As Word.Document
Set wdApp = New Word.Application
Set mdoc = wdApp.Documents.Add()

Dim db As Database
Dim rec As Recordset

Set db = CurrentDb()
Set rec = db.OpenRecordset("SELECT [Word], [sc], [suggested] FRO
[2]")

DBEngine.SetOption dbMaxLocksPerFile, 100000000
Do While Not rec.EOF
If wdApp.CheckSpelling(rec!Word) Then
rec.Edit
rec!sc = 1
rec.Update
Else
rec.Edit
If wdApp.GetSpellingSuggestions(rec!Word).Count <> 0 Then
rec!suggested
wdApp.GetSpellingSuggestions(rec!Word).Item(1).Name
Else
rec!suggested = Null
End If
rec!sc = 0
rec.Update
End If

rec.MoveNext
Loop

rec.Close
Set rec = Nothing
db.Close
Set db = Nothing
wdApp.Quit
Set wdApp = Nothing
MsgBox ("Done!!")

End Functio
 
Hi All,
Can anybody help
would like to do a Spell check on Column "A" and Get the Suggested
Word in the Column "B" if is is not the right word.
Using VBA. Or somthing like AutoSpell Check (I.e) in case of Word.


Thanks
Char
 
Back
Top