LOTUSSCRIPT/COM/OLE CLASSES


Examples: OpenDatabaseIfModified
This Visual Basic code opens a local database if it has been modified since yesterday.

Private Sub OpenIfMod_Click()
On Error GoTo errorHandler
Dim s As New NotesSession
s.Initialize
Dim dir As NotesDbDirectory
Dim db As NotesDatabase
Dim dt As NotesDateTime
Set dt = s.CreateDateTime("Yesterday")
Set dir = s.GetDbDirectory("")
Set db = dir.OpenDatabaseIfModified("names.nsf", dt)
MsgBox db.Title, , db.FilePath
Exit Sub
errorHandler:
MsgBox Err.Description, , Hex(Err.Number)
End Sub

See Also