例: IsPublic property (NotesAgent - LotusScript®)

次のスクリプトは、現在のデータベースの共有エージェントと個人エージェントの個数を計算します。

Dim session As New NotesSession
Dim db As NotesDatabase
Dim sharedCount As Integer
Dim privateCount As Integer
Set db = session.CurrentDatabase
sharedCount = 0
privateCount = 0    
Forall a In db.Agents
  If a.IsPublic Then
    sharedCount = sharedCount + 1
  Else
    privateCount = privateCount + 1
  End If
End Forall
Messagebox _
( "There are " & sharedCount & " shared agents" )
Messagebox _
( "You have " & privateCount & " private agents" )