![]() |
|
#2
|
|||
|
|||
|
Hi! The folowing code will replace all 3 and more paragraph signs with two ones in the selected range:
Code:
Sub Deleemptyparagraphs()
selection.Find.ClearFormatting
selection.Find.Replacement.ClearFormatting
With selection.Find
.text = Chr(13) & "{3;}"
.Replacement.text = "^p^p"
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.MatchAllWordForms = False
.MatchSoundsLike = False
End With
selection.Find.Execute Replace:=wdReplaceAll
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
VBA Code to remove specific highlight
|
syl3786 | Word VBA | 4 | 03-27-2023 05:01 PM |
I need to remove rows in a table where the Merge field is empty
|
WordMonkey1 | Mail Merge | 2 | 10-28-2020 12:25 AM |
| Let bookmark check if there are empty bookmarks before and place sentence there? | RevoMedia | Word VBA | 7 | 01-21-2020 08:04 AM |
Design Macro or Code to Delete Table Rows When Null/Blank/Empty Upon Doc Close/Save
|
aaghd72 | Word VBA | 8 | 02-18-2019 11:22 AM |
Mail merge: remove empty rows when a field is not showed
|
Yarikh | Mail Merge | 4 | 09-23-2018 12:17 AM |