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

Spelling Errors by dziv

dziv
Tue Oct 26 20:00:57 CDT 2004

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


>-----Original Message-----
>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
>.
>