du kan prøve at bruge den her funktion (LinkStringMail2) i følgende sektion:
Do While Not rstExcel.EOF
Response.Write "<tr bgcolor=" & bgcolor & ">" & vbCrLf
For I = 0 To iCols - 1
Response.Write "<td><h5>"
Response.Write LinkStringMail2(rstExcel.Fields.Item(I).Value) 'altså her
Response.Write "</h5></td>" & vbCrLf
Next 'I
Response.Write "</tr>" & vbCrLf
Denne her funktion sættes ind i toppen af dit asp-dokument:
<%
Function LinkStringMail2(strInput)
Set objRegExpHTTP1 = New RegExp
Set objRegExpHTTP2 = New RegExp
Set objRegExpEMail = New RegExp
objRegExpHTTP1.Pattern = "(http|ftp)(:\/\/[\w\._-]+\.[\w\._-]+\S*)"
objRegExpHTTP2.Pattern = "(^|[^\/])(www[^\.\s]?\.[\w\._-]+\.[A-Za-z]{2,3}[\w\S]*)"
objRegExpEMail.Pattern = "([\w\._-]+@[\w\._-]+\.[A-Za-z]{2,3}\S*)"
objRegExpHTTP1.Global = True
objRegExpHTTP2.Global = True
objRegExpEMail.Global = True
objRegExpHTTP1.IgnoreCase = True
objRegExpHTTP2.IgnoreCase = True
objRegExpEMail.IgnoreCase = True
strOutput = objRegExpEMail.Replace(strInput, " <a href='mailto:$1'>$1</a> ")
strOutput = objRegExpHTTP1.Replace(strOutput, " <a href='$1$2' target='_blank'>$1$2</a> ")
strOutput = objRegExpHTTP2.Replace(strOutput, " $1<a href='
http://$2' target='_blank'>$2</a> ")
objRegExpHTTP2.Pattern = "(<br>|[,.)\]\}])('>)"
strOutput = objRegExpHTTP2.Replace(strOutput, "$2")
objRegExpHTTP2.Pattern = "(<br>|[,.)\]\}])(' target=)"
strOutput = objRegExpHTTP2.Replace(strOutput, "$2")
objRegExpHTTP2.Pattern = "(<br>|[,.)\]\}])(</a>)"
strOutput = objRegExpHTTP2.Replace(strOutput, "$2$1")
Set objRegExpHTTP2 = Nothing
set objRegExpHTTP1 = Nothing
Set objRegExpEMail = Nothing
LinkStringMail2 = strOutput
End Function
%>