LOTUSSCRIPT /COM/OLE のクラス
例:GetNextDocument メソッド
1 次のスクリプトはビュー内の 2 番目の文書を取得します。
Dim db As New NotesDatabase( "Istanbul", "contacts.nsf" )
Dim view As NotesView
Dim firstDoc As NotesDocument
Dim secondDoc As NotesDocument
Set view = db.GetView( "Main View" )
Set firstDoc = view.GetFirstDocument
Set secondDoc = view.GetNextDocument( firstDoc )
2 次のスクリプトは While ループと GetNextDocument を使ってビュー内のすべての文書にアクセスする方法を示したものです。While ループは GetNextDocument から Nothing が返されてビュー内にそれ以上文書がないことが示されると終了します。この手法は、さまざまな場合に役に立ちます。たとえば、次のスクリプトは、[Open\By Due Date] ビュー内の各文書が更新されているかどうかを毎日チェックするのに使えます。更新されていないと、その文書の作成者にメールを送ります。
Dim db As New NotesDatabase _
( "Ankara", "current\projects.nsf" )
Dim view As NotesView
Dim doc As NotesDocument
Set view = db.GetView( "Open\By Due Date" )
Set doc = view.GetFirstDocument
While Not ( doc Is Nothing )
If doc.LastModified < Today Then
Call doc.Send( True, doc.Authors )
End If
Set doc = view.GetNextDocument( doc )
Wend
関連項目
GetNextDocument メソッド
用語集
フィードバック
ヘルプ
または
プロダクトユーザビリティ
?
ヘルプの使い方
すべてのヘルプ項目
用語集