View Single Post
 
Old 02-29-2020, 11:07 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Sub Demo()
Dim Rng As Range, i As Long, p As Long, StrOut As String
p = 1
For Each Rng In ActiveDocument.Range.SpellingErrors
  With Rng
    If .Information(wdActiveEndPageNumber) > p Then
      If i > 0 Then
        StrOut = StrOut & vbCr & "Pg: " & p & "-" & i
        p = .Information(wdActiveEndPageNumber): i = 1
      End If
    Else
      i = i + 1
    End If
  End With
Next
StrOut = StrOut & vbCr & "Pg: " & p & "-" & i
MsgBox StrOut
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote