-
Whoops, slight mistake in that code...
[VBA]
Public Function fGetFoundRanges(rngSearch As Range, lColorIndex As WdColorIndex) As Collection
Dim colRet As Collection
Set colRet = New Collection
With rngSearch.Find
.Font.ColorIndex = lColorIndex
Do Until .Execute = False
colRet.Add rngSearch.Duplicate
Loop
End With
'return the collection
Set fGetFoundRanges = colRet
End Function
[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules