View Single Post
 
Old 09-14-2013, 04:16 PM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,598
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Code:
Sub DemoScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim arrFind() As String
Dim arrReplace() As String
Dim oRng As Word.Range
Dim lngIndex As Long
arrFind = Split("<25>|<24>|<23>|<22>|<21>|<20>|<19>|<18>|<17>|<16>|<15>|<14>|<13>|<12>|<11>|<10>|<9>|<8>|<7>|<6>|<5>|<4>|<3>|<2>|<1>|<0>", "|")
arrReplace = Split("W|L|M|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?", "|")
For lngIndex = 0 To UBound(arrFind)
  Set oRng = ActiveDocument.Range
  With oRng.Find
    .Text = arrFind(lngIndex)
    .MatchWildcards = True
    .Replacement.Text = arrReplace(lngIndex)
    .Execute Replace:=wdReplaceAll
  End With
Next lngIndex
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote