Hi All,
I have a large document (over 1000 pages) and want to copy all the
misspelled words and paste them in new document (1 below the other)
how can this be done? I am using Word 2003.
Thanks in advance :)
Greg Maxey - 29 Nov 2006 15:41 GMT
Not tested on a document that large, but you migh try my:
http://gregmaxey.mvps.org/List_Spelling_Errors.htm
> Hi All,
>
[quoted text clipped - 3 lines]
>
> Thanks in advance :)
Greg Maxey - 29 Nov 2006 15:45 GMT
Note tested on such a large document, but you might try my:
http://gregmaxey.mvps.org/List_Spelling_Errors.htm
> Hi All,
>
[quoted text clipped - 3 lines]
>
> Thanks in advance :)
Greg Maxey - 29 Nov 2006 15:55 GMT
If you don't want to use the code in my weblink then a simple version
would be:
Sub ListErrorsAllowDups()
Dim oErr As Word.Range
Dim oCol As Collection
Dim i As Long
Set oCol = New Collection
For Each oErr In ActiveDocument.Range.SpellingErrors
oCol.Add oErr
Next
Documents.Add
For i = 1 To oCol.Count
ActiveDocument.Range.InsertAfter oCol(i) & vbCr
Next i
End Sub
Sub ListErrorsNoDups()
Dim oErr As Word.Range
Dim oCol As Collection
Dim i As Long
Dim bDup As Boolean
Set oCol = New Collection
For Each oErr In ActiveDocument.Range.SpellingErrors
bDup = False
For i = 1 To oCol.Count
If oCol(i) = oErr Then bDup = True
Next i
If Not bDup Then oCol.Add oErr
Next
Documents.Add
For i = 1 To oCol.Count
ActiveDocument.Range.InsertAfter oCol(i) & vbCr
Next i
End Sub
> Hi All,
>
[quoted text clipped - 3 lines]
>
> Thanks in advance :)
Greg Maxey - 29 Nov 2006 20:38 GMT
Karl,
I had come up with this earlier before I started exploring the class
method:
Sub ListErrorsNoDups()
Dim oErr As Word.Range
Dim oCol As Collection
Dim i As Long
Dim bDup As Boolean
Set oCol = New Collection
For Each oErr In ActiveDocument.Range.SpellingErrors
bDup = False
For i = 1 To oCol.Count
If oCol(i) = oErr Then bDup = True
Next i
If Not bDup Then oCol.Add oErr
Next
Documents.Add
For i = 1 To oCol.Count
ActiveDocument.Range.InsertAfter oCol(i) & vbCr
Next i
End Sub
I like you method better.
Would you have anything that demonstrated this raise and sink events
idea that you mentioned?
> If you don't want to use the code in my weblink then a simple version
> would be:
[quoted text clipped - 39 lines]
> >
> > Thanks in advance :)
Greg Maxey - 29 Nov 2006 20:40 GMT
Sorry for the last post. I am clearly a scatter brain today.
> Karl,
>
[quoted text clipped - 68 lines]
> > >
> > > Thanks in advance :)
rj - 30 Nov 2006 07:49 GMT
Hey thanks so much bru..
> Sorry for the last post. I am clearly a scatter brain today.
>
[quoted text clipped - 70 lines]
>
> > > > Thanks in advance :)