Richard,
I have a function that I've created for use with a hyperlink field that
converts the standard entry "
[email protected]#
http://[email protected]#"
to an email string "johndoe#mailto:
[email protected]#" If you are looking
for a more permanent method, the following function could be fairly easily
modified to change your string. Otherwise, for a one-time deal, I'm sure
John's suggestion would be much easier. Let me know if you need a hand with
the code:
***CODE START (Mine is placed in a utility module)***
Public Function pbfConvToEml(strHlink) As String
On Error GoTo Error_pbfConvToEml
'***** BODY
'
Dim strResult As String
Dim strChar As String
Dim intLen As Integer
Dim intCount As Integer
Dim intPos As Integer
Dim strAdrs As String
intLen = Len(strHlink)
strChar = Mid(strHlink, 1, 1)
intCount = 1
While Not strChar = "#"
strChar = Mid(strHlink, intCount, 1)
intCount = intCount + 1
Wend
intPos = intCount - 2
strAdrs = Mid(strHlink, 1, intPos)
strResult = strAdrs & "#mailto:" & strAdrs & "#"
pbfConvToEml = strResult
'
'***** BODY END
Exit_pbfConvToEml:
'Close variables
strResult = ""
strChar = ""
intLen = 0
intCount = 0
intPos = 0
strAdrs = ""
Exit Function
Error_pbfConvToEml:
MsgBox "Error " & Err.Number & " (" & Err.DESCRIPTION & ") in procedure
pbfConvToEml of Module modStdFrmCode"
Resume Exit_pbfConvToEml
End Function
***CODE END***