![]() |
|
#2
|
||||
|
||||
|
Try:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long, StrFnd As String
With ActiveDocument
For i = .Paragraphs.Count To 1 Step -1
StrFnd = .Paragraphs(i).Range.Text
With .Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = StrFnd
.Replacement.Text = ""
.Format = False
.Forward = True
.Wrap = wdFindContinue
.MatchAllWordForms = False
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
.Range.InsertAfter StrFnd
Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
| Tags |
| array, vba word |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to find out the duplicates and highlight them? | Learner7 | Excel | 6 | 06-08-2017 06:04 AM |
Word Macro to find and delete rows that contain adjacent cells containing "."
|
AlexanderJohnWilley | Word VBA | 7 | 11-08-2012 10:15 AM |
| Find/Delete inline Page #'s | alderfall | Word | 6 | 11-06-2012 11:51 AM |
| Find duplicates formula | hannu | Excel | 2 | 10-26-2010 02:48 AM |
sum of duplicates
|
zxmax | Excel | 1 | 09-29-2006 08:29 PM |