LOTUSSCRIPT /COM/OLE のクラス


例:RemovePermanently メソッド
次のエージェントは、[一時的削除を許可] が有効になっているかどうかと、ユーザープリファレンスに基づいて、現在の文書の完全な削除または一時的削除を実行します。

Sub Initialize
 Dim session As New NotesSession
 Dim db As NotesDatabase
 Set db = session.CurrentDatabase
 Dim dc As NotesDocumentCollection
 Set dc = db.UnprocessedDocuments
 Dim doc As NotesDocument
 Set doc = dc.GetFirstDocument
 If db.GetOption(DBOPT_SOFTDELETE) Then
   If Messagebox("Do you want a hard deletion?", _
   MB_YESNO + MB_ICONQUESTION, "Hard or soft") = IDYES Then
     Call doc.RemovePermanently(True)
   Else
     Call doc.Remove(True)
   End If  
 Else
   Call doc.Remove(True)
 End If
End Sub

関連項目