Duplicate removal for VBA Word not working effectively
问题 I have a program to remove duplicates and everything is working properly. It is just freezing with large data sets i.e. 1 to 2.5 million words. What is wrong with my approach? Is there a better one? Sub DeleteDuplicateParagraphs() Dim p1 As Paragraph Dim p2 As Paragraph Dim DupCount As Long Dim StartTime As Double Dim SecondsElapsed As Double StartTime = Timer For Each p1 In ActiveDocument.Paragraphs If p1.range.Text <> vbCr Then For Each p2 In ActiveDocument.Paragraphs If p1.range.Text = p2