例: Created property (NotesDocument - LotusScript)

  1. 現在のデータベースの [Main] ビューの最後の文書の作成日時が 1995 年 2 月 7 日午前 10 時 17 分 16 秒であるとき、次のスクリプトは「2/7/95 10:17:16 AM」を表示します。
    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 )
  2. 次のスクリプトは、Created プロパティを使用して、文書が 1995 年 8 月 12 日以前に作成されたかどうかを調べます。この日付以前に作成されたとき、文書は他のデータベースにコピーされて現在のデータベースから削除されます。
    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