例: CopyToDatabase method

次のスクリプトは、文書が 1995 年 8 月 12 日以前に作成されたかどうかを調べます。この条件に該当する場合、文書をアーカイブデータベースにコピーします。

Dim archiveDb As New NotesDatabase( "", "" )
Dim doc  As NotesDocument
'...set value of archiveDb...
'...set value of doc...
If ( doc.Created < Datenumber( 1995, 8, 12 ) ) Then
  Call doc.CopyToDatabase( archiveDb )
'You can use the call statement because the
'program does not need the return value 
'(a handle to the new document)
End If