Spelling Errors

R

Ravi Newgen

Hi

I am trying to get all the spelling errors through macro from
document. It is not working perfectly. I executed the macro for a file
which is of BIGGER size. There are atleast 1000 spelling errors in
that.
But, i am getting only few errors. Please advice.

The code is as follows:


Sub GetSpellingErrors()
ActiveDocument.SpellingChecked = False
Selection.WholeStory
Selection.LanguageID = wdEnglishUK
Selection.HomeKey unit:=wdStory
Open "c:\windows\desktop\out.txt" For Output As #1
For i = 1 To ActiveDocument.SpellingErrors.Count
print #1, ActiveDocument.SpellingErrors(i).Text
Next i
Close #1
End Sub

-Ravi
 
D

dziv

Don't you need a line feed somewhere in your for loop?
Maybe some of the entries are just writing over the
existing ones.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top