LOTUSSCRIPT /COM/OLE のクラス
例:SentByAgent プロパティ
1. 次のスクリプトは文書がスクリプトで送信されたかどうかを調べ、スクリプトで送信されている場合は、その文書を削除します。
Dim doc As NotesDocument
'...set value of doc...
If doc.SentByAgent Then
Call doc.Remove( True )
End If
2. 次のエージェントスクリプトは現在のデータベースで新規のメールが受信されたときに実行され、新規のメール文書を処理します。スクリプトは各メール文書がユーザーの送信操作で送信されたのかどうかを調べます。ユーザーの操作で送信されたとき、スクリプトは返答を送信します。ユーザーの操作で送信されていないとき、スクリプトは何も実行しません。
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim memo As NotesDocument
Dim reply As NotesDocument
Set db = session.CurrentDatabase
' get new mail memos
Set collection = db.UnprocessedDocuments
Set memo = collection.GetFirstDocument()
While Not(memo Is Nothing)
If Not( memo.SentByAgent ) Then
Set reply = memo.CreateReplyMessage( False )
reply.Subject = "Re:" & memo.Subject( 0 )
reply.Body = _
"I'm out of the office until 3/15. John."
Call reply.Send( False )
End If
Call session.UpdateProcessedDoc( memo )
Set memo = collection.GetNextDocument(memo)
Wend
関連項目
SentByAgent プロパティ
用語集
フィードバック
ヘルプ
または
プロダクトユーザビリティ
ヘルプの使い方
すべてのヘルプ項目
用語集