LOTUSSCRIPT /COM/OLE のクラス
例:Search メソッド
1. 次のスクリプトは @IsResponseDoc を使用して、この 1 ヵ月の間に作成か変更されたすべての返答文書のコレクションを取得します。
Dim db As New NotesDatabase("Katmandu","somedocs.nsf")
Dim collection As NotesDocumentCollection
Dim dateTime As New NotesDateTime("")
Call dateTime.SetNow
Call dateTime.AdjustMonth(-1)
Set collection = db.Search("@IsResponseDoc",dateTime,0)
2. 次のスクリプトは、@IsResponseDoc を使用して、データベース内のすべての返答文書のコレクションを取得します。
Dim db As New NotesDatabase("Katmandu","somedocs.nsf")
Dim collection As NotesDocumentCollection
Set collection = db.Search("@IsResponseDoc",Nothing,0)
3. 次のスクリプトは、プロジェクトの参加者に、データベースからプロジェクト文書をメールで送信して期限を確認させます。各文書の ReminderDate アイテムに確認の文書を送付する日時を指定します。Search メソッドは ReminderDate アイテムに今日の日付が設定されているすべてのプロジェクト文書を取得し、メールで送信します。そして、ReminderDate アイテムの日付を 1 週間後の日付に更新します。
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim nextDateTime As NotesDateTime
searchFormula$ = {Form = "Project" & ReminderDate = @Today}
Set db = session.CurrentDatabase
Set collection = db.Search(searchFormula$, Nothing,0)
Set doc = collection.GetFirstDocument()
Set nextDateTime = New NotesDateTime("Today")
Call nextDateTime.AdjustDay(7)
While Not(doc Is Nothing)
Call doc.Send( True )
Call doc.ReplaceItemValue("ReminderDate", _
nextDateTime.LSLocalTime )
Call doc.Save( True, False )
Set doc = collection.GetNextDocument(doc)
Wend
End Sub
関連項目
Search メソッド
用語集
フィードバック
ヘルプ
または
プロダクトユーザビリティ
ヘルプの使い方
すべてのヘルプ項目
用語集