Sub highlightdup()
Dim I, J As Long
Dim xRngFind, xRng As Range
Dim xStrFind, xStr As String
Options.DefaultHighlightColorIndex = wdYellow
Application.ScreenUpdating = False
With ActiveDocument
For I = 1 To .Paragraphs.Count - 1
Set xRngFind = .Paragraphs(I).Range
If xRngFind.HighlightColorIndex <> wdYellow Then
For J = I + 1 To .Paragraphs.Count
Set xRng = .Paragraphs(J).Range
If xRngFind.Text = xRng.Text Then
xRngFind.HighlightColorIndex = wdBrightGreen
xRng.HighlightColorIndex = wdYellow
End If
Next
End If
Next
End With
End Sub
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。