![]() |
|
#4
|
|||
|
|||
|
Karkey/eduzs
For Each Loops in VBA can start to bog down very quickly in long documents. Better to first find what you are looking for then apply processes: Sub ScratchMacro() 'A basic Word macro coded by Greg Maxey Dim oRng As Range Set oRng = ActiveDocument.Range oRng.InsertBefore vbCr With oRng.Find .Text = Chr(13) & "<" While .Execute oRng.Paragraphs(2).Range.HighlightColorIndex = wdBrightGreen Wend End With ActiveDocument.Range.Paragraphs(1).Range.Delete lbl_Exit: Exit Sub End Sub |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Range method Find can't find dates
|
jmcsa3 | Excel Programming | 1 | 05-02-2020 06:56 AM |
| How do you use the find and replace tool to find dates and times in Excel 2013? | Jules90 | Excel | 3 | 04-14-2020 07:40 PM |
| find IP in range / find number between numbers | gn28 | Excel | 4 | 06-14-2015 03:46 PM |
Find what box in Find and replace limits the length of a search term
|
Hoxton118 | Word VBA | 7 | 06-10-2014 05:05 AM |
Bad view when using Find and Find & Replace - Word places found string on top line
|
paulkaye | Word | 4 | 12-06-2011 11:05 PM |