When an email comes in with a body that contains any string of 5 numbers, I want to replace that with a URL in order to create a clickable link to the record. See code below:

I have 2 problems.

1. With the code below, I'm only getting one string replaced in each email that comes in. So, If I had a set of 4 five number ID's, only one would be converted into a Hyperlink.
2. The script seems to ruin all formatting of the incoming email. Ideally, all I want to change is the 5 number string into a hyperlink, the rest of the formatting should stay the same, with zero line breaks or carriage returns, etc...

```
Option Explicit

Sub InsertHyperLink(MyMail As MailItem)
    Dim body As String, re As Object, match As Variant, slgLink As String
    body = MyMail.body
    slgLink = "http://lnet/servicelog/serviceLogInfo.jsf?slNumber="

    Set re = CreateObject("vbscript.regexp")
    re.Pattern = "[0-9][0-9][0-9][0-9][0-9]"

    For Each match In re.Execute(body)
        body = Replace(body, match.Value, "<p><a href=" & Chr(34) & slgLink & Right(match.Value, 5) & Chr(34) & ">" & Right(match.Value, 5) & "</a></p>", 1, -1, vbTextCompare)
    Next

    MyMail.HTMLBody = body
    MyMail.Save
End Sub

```