例: OpenNotesLog method

  1. 次のスクリプトは現在のコンピュータの AGENTLOG.NSF を開きます。アクションやエラーが記録されるたびに、新しい文書が .AGENTLOG.NSF に作成されます。
    Dim currentLog As New NotesLog( "Database log" )
    Call currentLog.OpenNotesLog( "", "agentlog.nsf" )
    '...log some actions and errors...
    Call currentLog.Close
  2. 次のスクリプトは現在のコンピュータの Domino データディレクトリを検索して、[StdR4AgentLog] テンプレートから設計を引き継ぐ最初のデータベースを見つけます。データベースが見つかると、スクリプトはログを記録するためにデータベースを開きます。
Dim currentLog As NotesLog
Dim directory As NotesDbDirectory
Dim db As NotesDatabase
Dim done As Variant
Set currentLog = New NotesLog( "Database log" )
Set directory = New NotesDbDirectory( "" )
Set db = directory.GetFirstDatabase( DATABASE )
done = False
While Not ( db Is Nothing ) And Not done
  Call db.Open( "", "" )
  If ( db.DesignTemplateName = "StdR4AgentLog" ) Then
    done = True
  Else
    Set db = directory.GetNextDatabase
  End If
Wend
Call currentLog.OpenNotesLog( db.Server, db.FilePath )
'...log some actions and errors
Call currentLog.Close