
(This is why the first step, sorting the e-mail addresses, is necessary.) These are then replaced with whatever was in the parentheses in step 5. The second part is the sign, which means "find one or more occurrences of the forgoing." Thus, it finds duplicate paragraphs that are one after the other. The first part, within the parentheses, finds anything (the asterisk) ending in a hard return (the ^13). This works because of the way that the pattern in the Find What box (step 5) is set up.


Paragraphs.Count - 1 To 1 Step -1įor K =. The macro does not require that the e-mail addresses be sorted.įor J =. When a duplicate paragraph is located, the duplicate is deleted. It uses two For.Next loops to step through the individual paragraphs in a document backwards. With that in mind, the following macro can be a big help. Also, the addresses are in regular text, not within a table. Steve wonders if there is a way to remove duplicates within Word.įor the purposes of this tip, I'm going to assume that each e-mail address is in its own paragraph, meaning that there is a hard return at the end of individual addresses. To find and remove duplicate addresses, he has to transfer the addresses to an Excel workbook. Steve keeps e-mail addresses in a Word document.
