Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim URL As String
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
Selection.ClearFormatting
.Text = "http" & "*" & vbCr & "-----"
.MatchWildcards = True
.MatchWholeWord = True
Do While .Execute
oRng.End = oRng.End - 6
URL = oRng.Text
oRng.Collapse wdCollapseEnd
Loop
End With
MsgBox URL
lbl_Exit:
Exit Sub
End Sub