Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim createDate As Variant
Set db = session.CurrentDatabase
Set view = db.GetView( "Main View" )
Set doc = view.GetLastDocument
createDate = doc.Created
Messagebox( createDate )
Dim doc As NotesDocument
Dim archiveDb As NotesDatabase
'...set value of doc...
'...set value of archiveDb...
If ( doc.Created < Datenumber( 1995, 8, 12 ) ) Then
Call doc.CopyToDatabase( archiveDb )
Call doc.Remove( False )
End If