![]() |
|
|
|
#1
|
||||
|
||||
|
Try:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWildcards = True
.Text = "[^13]{1,}"
.Replacement.Text = " "
.Execute Replace:=wdReplaceAll
.Text = "[ ]{2,}"
.Replacement.Text = " "
.Execute Replace:=wdReplaceAll
.Text = "(<[0-9]{1,}[!0-9]@)([A-Z]\))"
.Replacement.Text = "^p\1^p\2"
.Execute Replace:=wdReplaceAll
.Text = "(<[0-9]{1,}[!0-9]@) ^13"
.Replacement.Text = "\1^l"
.Replacement.Style = "Strong"
.Execute Replace:=wdReplaceAll
End With
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
| Tags |
| macro multiple functions |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Infinite loops occurring in find and replace functions in word macro
|
Thefirstfish` | Word VBA | 5 | 04-06-2017 07:18 PM |
Why are my Macros combined into a single module?
|
Cyberseeker | Excel Programming | 1 | 04-02-2017 02:43 AM |
Creating a "super macro" with all kind of functions
|
Xanthopteryx | PowerPoint | 1 | 06-16-2016 01:38 AM |
what functions would this task use, format, macro ? etc
|
fremoy | Word | 2 | 02-16-2015 10:48 AM |
Macro to save to a single PDF
|
LukeExcelKid | Excel Programming | 4 | 11-17-2013 01:39 PM |