![]() |
|
#4
|
|||
|
|||
|
Not directly related, but why can you also put the execute replace statement outside the with...end with "loop"?
In other words, this: Code:
Sub Macro1() With Selection.Find .ClearFormatting .Replacement.ClearFormatting .Text = "^13{2,}" .Replacement.Text = "^p^p" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True ' .Execute Replace:=wdReplaceAll End With
Selection.Find.Execute Replace:=wdReplaceAll End Sub
Does the Selection.Find just find everything...but do nothing until the execute? If so, why don't you HAVE to put the replace all outside the loop? |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
A way to delete when 2nd column is empty
|
gavi12 | Word VBA | 1 | 04-04-2020 05:42 AM |
Delete row with empty cel in a table
|
vibor | Word VBA | 9 | 05-03-2015 05:42 AM |
Remove empty lines at the top of every page
|
dexter30 | Word VBA | 2 | 08-05-2013 08:37 PM |
| regular expressions for empty lines | eNGiNe | Word | 1 | 01-21-2013 06:38 AM |
| Deleting empty lines | lostsoul62 | Word | 5 | 04-16-2012 04:55 AM |