Hi Joseph,
This is small script and it doesn't cover all scenarios yet but it should be enough to get you started.
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim coll As NotesDocumentCollection
Dim doc, nextdoc As NotesDocument
Dim item As NotesItem
Dim count As Integer
Dim newname As String
Set db = s.Currentdatabase
Set coll = db.Unprocesseddocuments
Set doc = coll.GetFirstDocument
While Not doc Is Nothing
count = 0
Set nextdoc = coll.Getnextdocument(doc)
Set item = doc.GetFirstItem("FullName")
ForAll username In item.Values
If InStr(1, username, "@abc.com")>1 Then
count = count + 1
End If
End ForAll
If count > 0 Then
MessageBox "Valid email address found in Username!"
GoTo MovingOn
Else
newname = doc.ShortName(0) + "@abc.com"
Call item.AppendToTextList(newname)
Call doc.Save(False,False)
MessageBox "Valid email address not found! New entry added!"
End If
MovingOn:
Set doc = nextdoc
Wend
End Sub