![]() |
|
#2
|
||||
|
||||
|
Use a replacement of:
([0-9A-Z]{8})([0-9A-Z]{4})([0-9A-Z]{4})([0-9A-Z]{4})([0-9A-Z]{12}) with \1-\2-\3-\4-\5 with the wildcard option set - http://www.gmayor.com/replace_using_wildcards.htm or by macro Code:
Sub Macro1()
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
Do While .Execute(FindText:="([0-9A-Z]{8})([0-9A-Z]{4})([0-9A-Z]{4})([0-9A-Z]{4})([0-9A-Z]{12})", _
MatchWildcards:=True, ReplaceWith:="\1-\2-\3-\4-\5")
oRng.Collapse 0
Loop
End With
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Search+replace all --- [3 dashes] with square wingding
|
imported_contiw | Word | 14 | 10-04-2017 01:03 PM |
| Numbered list and one row table to appear on same line | jsukan | Word Tables | 1 | 04-09-2015 01:04 AM |
changing colons into dashes
|
retrofan | Word | 2 | 07-27-2014 05:05 AM |
| letters are dashes | pmd | Word | 5 | 03-05-2012 08:08 PM |
| Why word does not wrap on dashes? | lyrebird | Word | 3 | 06-23-2010 01:32 AM |