![]() |
|
#2
|
||||
|
||||
|
Try the following simpler code
Code:
Sub FindRedcoloredText()
Dim i As Long
Dim oRng As Range
i = 0
Set oRng = ActiveDocument.Range
With oRng.Find
.Font.Color = wdColorRed
Do While .Execute(Forward:=True)
i = i + 1
Debug.Print CStr(i) + ". " & _
oRng.Text + " " & _
CStr(Selection.Range.ComputeStatistics(wdStatisticPages))
DoEvents
Loop
End With
lbl_Exit:
Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Indentation Not Working Properly
|
LaC0saNostra | Word | 2 | 02-01-2015 11:35 AM |
| Word won't open up properly | PattiChati | Word | 1 | 12-18-2013 05:37 PM |
How to properly indent in MSWORD2007
|
nungesh | Word | 1 | 11-25-2013 04:26 PM |
| Word 2000 Macro not working properly | brianlb | Word VBA | 1 | 07-01-2009 07:04 AM |
| Not printing properly | Louis | Outlook | 0 | 08-05-2005 07:25 AM |