Examples: NotesSession class

This script creates a new NotesSession and uses it to access the current database (the database in which the script is running). This technique avoids hard-coding the file names of databases into scripts.

Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
If ( db.IsOpen ) Then
  Print db.Title
Else
  Call db.Open( "", "" )
  Print db.Title
End If