

Microsoft doesn’t exactly have a stellar security reputation, but Word 2010 makes a serious effort. Word 2010’s ribbon isn’t the Word 2003 interface you remember, but it is an easier transition than Office 2007 offered. There isn’t a “look like Word 2003” setting, but you can certainly bring all those “crap, I can’t find it now” functions front and center, even pegging them to a list of quick buttons that sit below the ribbon and are always visible. First, the File menu makes a comeback, and the ribbon itself is easily customized. The good news is that the ribbon is vastly improved in Word 2010. The bad news is that the ribbon returns in Word 2010. Thus, the effect is that paragraphs 2-4 are replaced with paragraph 2, and duplicates are removed.Microsoft Word 2007 enraged a great many users by drastically revamping the program interface that had remained largely unchanged – and was thus innately familiar - since Word 97. (Remember that the symbol matches "one or more occurrences of the foregoing.") This match of three paragraphs is then replaced with what was originally matched by the *^13 portion of the Find What pattern, which means the contents of line 2. The Find What pattern, would match paragraphs 2-4 because paragraph 2, which matches the portion of the pattern within parentheses, is repeated two more times on lines 3 and 4. Let's say that after sorting, your list of e-mail addresses looks like this:ġ that I added the leading numbers here to help with the explanation only they are not a part of the list of e-mail addresses. This might help explain what is going on a bit better. (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. In the Replace With box, enter " \1" (again, without the quote marks).In the Find What box, enter " (without the quote marks).Make sure the Use Wildcards check box is selected.Click the More button, if it is available.Press Ctrl+H to display the Replace tab of the Find and Replace dialog box.Sort the paragraphs containing the e-mail addresses.There is an approach you can use that relies on the wildcard capabilities of Word's Find and Replace capabilities. Truth be told, though, you don't need to actually use a macro. I provided the possible macro-based solutions first on the assumption that removing the duplicates is something that needs to be done regularly or on multiple files. Nothing outside of your selected paragraphs will be modified. To use the macro, just select the paragraphs you want to affect and then run it. If you prefer a variation that works just on selected text, then the following will work for you: The macro also works on all paragraphs in a document, not just on a portion of them. If, for instance, one paragraph has an extra space at the beginning or end or one has different capitalization, then they won't be considered the same and one won't be deleted. Note that the two paragraphs must be exactly the same. 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.
