View Single Post
 
Old 05-20-2015, 07:46 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,422
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Which above macro? There are three:

Code:
Sub ScratchMacro()
     'A basic Word macro coded by Greg Maxey
    Dim oRng As Word.Range
    Set oRng = ActiveDocument.Range
    With oRng.Find
        .Text = "Ref."
        While .Execute
            Do While oRng.Characters.Last.Next Like "[0-9]" _
                And oRng.Characters.Last.Next.Font.Superscript
                oRng.MoveEnd wdCharacter, 1
            Loop
            If Len(oRng.Text) > 4 Then
              oRng.Select 'Do something with the found range.
            End If
            oRng.Collapse wdCollapseEnd
        Wend
    End With
lbl_Exit:
    Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote