![]() |
|
#2
|
|||
|
|||
|
Try this
Code:
Sub Replace2returnsWith1()
Selection.WholeStory
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "^13{2,}"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro to delete text in specific styles
|
ljd108 | Word VBA | 14 | 01-22-2019 01:22 PM |
Remove Carriage Returns in Address Block Merge field
|
alan100 | Mail Merge | 5 | 12-12-2017 08:32 PM |
Excel VBA macro to copy specific rows and delete it
|
pourmalla | Excel Programming | 2 | 04-02-2017 12:09 AM |
Macro to delete rows not containing specific text
|
Alimou | Excel Programming | 4 | 02-06-2017 07:35 AM |
Run Script to remove carriage returns on certain columns
|
ryanjohnsond@gmail.com | Excel Programming | 34 | 09-03-2014 10:43 PM |