LOTUSSCRIPT /COM/OLE のクラス
例:FormatDocument メソッド
1. 次のスクリプトは、現在のデータベースで全文検索を実行し、検索結果のコレクションの最初の文書のレンダリングを作成した後で、レンダリングされた文書を Susanna Tallan にメールで送信します。
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim newsletter As NotesNewsletter
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.FTSearch( "botany", 0 )
Set newsletter = New NotesNewsletter( collection )
Set doc = newsletter.FormatDocument( db, 1 )
Call doc.Send( False, "Susanna Tallan" )
2. 次のスクリプトは、現在のデータベースで全文検索を実行します。スクリプトはコレクションの各文書のレンダリングを作成します (検索結果のコレクションは最大 3 つの文書を含みます)。また、スクリプトはオリジナル文書の Subject アイテムをレンダリングにコピーした後、そのレンダリングを Susanna Tallan に送信します。
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim newsletter As NotesNewsletter
Dim doc As NotesDocument
Dim j As Integer
Set db = session.CurrentDatabase
Set collection = db.FTSearch( "botany", 3 )
Set newsletter = New NotesNewsletter( collection )
' for every document in the newsletter's collection
For j = 1 To collection.Count
' create a rendering of the original document
Set doc = newsletter.FormatDocument( db, j )
' copy subject of original document into new document
doc.Subject = collection.GetNthDocument(j).Subject(0)
' send the new document
Call doc.Send( False, "Susanna Tallan" )
Next
関連項目
FormatDocument メソッド
用語集
フィードバック
ヘルプ
または
プロダクトユーザビリティ
ヘルプの使い方
すべてのヘルプ項目
用語集