LOTUSSCRIPT/COM/OLE CLASSES
Examples: Agents property
1. This action script prints the name of each agent in the current database. Since the script runs on a workstation, it prints the name of shared agents, as well as the names of the current user's private agents, if any.
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Forall a In db.Agents
Messagebox( a.Name )
End Forall
End Sub
2. This script finds the agent in the current database named Periodic Archive and assigns it to the agent object.
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 = "Periodic Archive" ) Then
Set agent = a
End If
End Forall
See Also
Agents property
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary