次のスクリプトは文書が過去 7 日の間に変更されたかどうかを調べます。変更されていないとき、スクリプトは督促メモを文書の作成者に送信します。
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim newDoc As NotesDocument
Dim weekDateTime As NotesDateTime
Dim modifiedDateTime As NotesDateTime
Set db = session.CurrentDatabase
Set doc = session.DocumentContext
Set weekDateTime = New NotesDateTime( "Today" )
Set modifiedDateTime = New NotesDateTime( "" )
Call weekDateTime.AdjustDay( -7 ) ' set to one week ago
modifiedDateTime.LSLocalTime = doc.LastModified
If weekDateTime.TimeDifference( modifiedDateTime ) > 0 Then
Set newDoc = New NotesDocument( db )
newDoc.Form = "Memo"
newDoc.Subject = _
"Reminder: please update your project plan"
Call newDoc.Send( False, doc.Authors )
End If