Hi,
I try to validate a multiple email store in a field with LS
Each time email contains a dash (-) the eval return nothing (eval does not contains a container).
Here the code:
===========
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim GroupEmails As Variant
Dim eval As Variant
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
GroupeEmails = doc.GroupEmails
x=0
Forall email In GroupEmails
eval = Evaluate(|@ValidateInternetAddress([Address821]; | & email & |)|)
’ If Not(eval(0) Is Nothing) Then
If eval(0) = "" Or eval(0) = " " Then
eval = Evaluate(|@ValidateInternetAddress([Address822]; | & email & |)|)
End If
’ Else
eval = Evaluate(|@ValidateInternetAddress([Address822]; | & email & |)|)
’ End If
’ If Not(eval Is Nothing) Then
If eval(0) <> "" Then
Call uidoc.FieldAppendText("Resultat", Cstr(x) & "- " & courriel & " - " & Cstr(eval(0)) & Chr(10))
End If
’ End If
x = x + 1
End Forall
End Sub
===========
Why the email with a dash (-) return nothing?
NOTE:
If I add the condition
If Not(eval(0) Is Nothing) Then
It’s return a Type mismatch
any sugg?
Thanks