creditcardkrot.blogg.se

How to delete duplicate documents from word
How to delete duplicate documents from word




(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.

how to delete duplicate documents from word

  • 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.

    how to delete duplicate documents from word

    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.






    How to delete duplicate documents from word