![]() |
|
#2
|
|||
|
|||
|
Code:
Sub Macro1()
Dim oRng As Word.Range
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Set oRng = ActiveDocument.Range
With oRng.Find 'Selection.Find
.Text = "([0-9]{1,})(:)([0-9]{1,})"
.Replacement.Text = "\3\2\1"
.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 |
| How to change the formatting of numbers without changing the numbers? | sullengirl | Word | 2 | 01-27-2014 03:06 PM |
| How do I refer to page numbers, when the numbers change as I prepare the document? | StevenD | Word | 5 | 11-29-2012 12:52 AM |
Where does my code go?
|
rbaldwin | Word VBA | 3 | 03-14-2012 02:31 PM |
Page Numbers Not Matching Chapter Numbers
|
gracie5290 | Word | 1 | 02-02-2012 11:41 PM |
| Extract Numbers from Zip Code | Karen615 | Excel | 3 | 09-21-2011 06:54 AM |