I'm pretty sure this VBA code will work in Excel 2003:
• Select the workbook you want to contain the macro
• ALT+F11...to open the VBA editor
• Insert.Module...to create a new module
• Copy the below VBA code and paste it into that module
Sub ConvertTxt2EmailLink()
Dim cCell As Range
Dim intResponse As Integer
Dim strURL As String
Dim strLinkText As String
Dim strPrefix As String
intResponse = MsgBox( _
Title:="mailto Option", _
Prompt:="OK that each link begins with 'mailto:'" & vbCr _
& "Click: YES ...to prepend mailto:, if missing" & vbCr _
& "Click: NO ...to evaluate each link 'as is'", _
Buttons:=vbYesNoCancel + vbQuestion)
Select Case intResponse
Case Is = vbYes
strPrefix = "mailto:"
Case Is = vbNo
strPrefix = ""
Case Is = vbCancel
Exit Sub
End Select
For Each cCell In selection.Cells
If cCell.Hyperlinks.Count = 0 Then
With cCell
If .Value <> "" Then
strLinkText = .Value
strURL = strPrefix & Replace( _
Expression:=.Value, _
Find:=strPrefix, _
Replace:="")
On Error Resume Next
ActiveSheet.Hyperlinks.Add _
Anchor:=cCell, _
Address:=strURL, _
TextToDisplay:=strLinkText
End If
End With
End If
Next cCell
End Sub
• Select your list of emails to be converted to email-links
• ALT+F8...to see the list of available macros
• Select: ConvertTxt2EmailLink
• Click: Run...and follow the instructions.
Does that help?
Bookmarks