SHowing the Type Mismatch for Forall
Set session = New notessession
set curdb = session.CurrentDatabase
Dim dbdir As New NotesDbDirectory(curdb.Server)
Dim db As NotesDatabase
Set db = dbdir.GetFirstDatabase(DATABASE)
While Not(db Is Nothing)
Forall a In db.Agents
Print a.Name
If a.Trigger=1 Then
Set ndoc = curdb.CreateDocument
ndoc.form = "Second"
ndoc.AgentName = a.Name
ndoc.DataBaseName=db.Title
ndoc.DataBaseTitle= db.FileName
ndoc.DataBasePath = db.FilePath
ndoc.AgentTrigger= "Scheduled Agent"
Call ndoc.save(True,True)
End If
End Forall
Set db = dbdir.GetNextDatabase
Wend