Dim session As New NotesSession
Dim db As NotesDatabase
Dim agent As NotesAgent
Set db = session.CurrentDatabase
Forall a In db.Agents
If ( a.Name = "Cleansing Agent" ) Then
Set agent = a
Exit Forall
End If
End Forall
Dim session As New NotesSession
Dim agent As NotesAgent
Dim n As String
Set agent = session.CurrentAgent
n = agent.Name