![]() |
|
|
|
#1
|
|||
|
|||
|
I wish to get spell check error count details (page wise) displayed through a MSGBOX (macro).
For instance: 1st page has 20 red colored words (spell checked word document). 2nd has 58. 3rd has 10. MSGBOX needs to display: 1st page - 20 2nd - 58 3rd - 10 Help appreciated. |
|
#2
|
|||
|
|||
|
Maybe something like:
Code:
Sub test()
Dim nPages As Long, StrTemp As String
nPages = ActiveDocument.BuiltInDocumentProperties(wdPropertyPages)
Application.ScreenUpdating = False
For x = 1 To nPages
Selection.GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=x
StrTemp = StrTemp & x & " page - " & ActiveDocument.Bookmarks("\Page").Range.SpellingErrors.Count & vbCr
Next x
Application.ScreenUpdating = True
MsgBox StrTemp
End Sub
|
|
#3
|
||||
|
||||
|
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] |
|
#4
|
|||
|
|||
|
Quote:
Quote:
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What's with the New Spell Check? | CrossReach | Word | 1 | 01-16-2019 06:34 AM |
| Is there a way to display a count of number of emails I sent today? | Yirg | Outlook | 0 | 01-20-2015 05:28 AM |
| Spell Check | HondaS600 | Office | 5 | 08-26-2013 01:04 PM |
Display unique values and count the number of child items
|
vthomeschoolmom | Excel | 2 | 07-25-2013 06:17 AM |
Spell Check
|
CommoMP | Word | 5 | 05-30-2011 05:40 PM |