View Single Post
 
Old 06-12-2015, 10:16 PM
SixStringSW SixStringSW is offline Windows XP Office 2000
Novice
 
Join Date: Jun 2015
Posts: 2
SixStringSW is on a distinguished road
Default

Quote:
Originally Posted by gmaxey View Post
Someone may be allow with a simplified find and replace, but it is late here:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oPar As Paragraph, oRng As Range
  For Each oPar In ActiveDocument.Range.Paragraphs
    Select Case Trim(oPar.Range.Words.First)
      Case "Sunday", "Monday", "Friday"
        Select Case True
          Case IsNumeric(oPar.Range.Words.Last.Previous)
            Set oRng = oPar.Range.Words.Last.Previous
            oRng.MoveStart wdCharacter, -3
            If IsNumeric(oRng) Then
              oPar.Style = "Body Text" 'Define some style you want to apply.
              
            End If
        End Select
    End Select
  Next oPar
lbl_Exit:
  Exit Sub
End Sub
Thanks, I'll give it a try!
Reply With Quote