Try:
Sub ScratchMacro()
Dim oMisSpelledWord As Word.Range
Dim oSource As Document
Dim oTarget As Document
Set oSource = ActiveDocument
Set oTarget = Documents.Add
oTarget.Range.ParagraphFormat.TabStops.Add Position:=InchesToPoints(6), _
Alignment:=wdAlignTabRight, Leader:=wdTabLeaderDots
For Each oMisSpelledWord In oSource.Range.SpellingErrors
oTarget.Range.InsertAfter oMisSpelledWord & vbTab & _
oMisSpelledWord.Information(wdActiveEndPageNumber) & vbCr
Next
With oTarget
.Range.End = .Range.End - 1
.Range.Sort
.Paragraphs(1).Range.Delete
.Activate
End With
End Sub
--
Greg Maxey - Word MVP
My web site
http://gregmaxey.mvps.org
Maybe something along the lines of
Dim sWord As String
Dim oSource As Document
Dim oTarget As Document
Set oSource = ActiveDocument
Set oTarget = Documents.Add
For i = 1 To oSource.Words.Count
sWord = oSource.Words(i)
If CheckSpelling(sWord, IgnoreUppercase:=False) = False Then
oTarget.Range.InsertAfter sWord & vbCr
End If
Next i
With oTarget
.Range.End = .Range.End - 1
.Range.Sort
.Paragraphs(1).Range.Delete
.Activate
End With
It will take a while to run!
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
- Show quoted text -
Hi Graham,
great coding. Thank you so much. Exactly what I wanted, although there
is one thing that would make this code even better. Is it possible to
list the respective page number of the misspelled word as well?
Regards, Andreas