LOTUSSCRIPT /COM/OLE のクラス
例:NotesNewsletter クラス
1. 次のスクリプトは、現在のデータベース上で全文検索を実行し、一致する各文書へのリンクを含むニュースレターを作成します。ニュースレターは、Sharron Karasic にメールで送信されます。
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( "arachnid", 15 )
If ( collection.Count > 0 ) Then
Set newsletter = New NotesNewsletter( collection )
Set doc = newsletter.FormatMsgWithDoclinks( db )
doc.Form = "Memo"
doc.Subject = "The Arachnid Report"
Call doc.Send( False, "Sharron Karasic" )
End If
2. 次のビューアクションスクリプトは、NotesDatabase の UnprocessedDocuments プロパティを使用して、ビューで現在選択されている文書のコレクションを取得します。選択された文書が 5 つ以下の場合、スクリプトはコレクションの各文書のレンダリングを作成し、現在のユーザーのメールデータベースに保存します。
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim mailDb As NotesDatabase
Dim collection As NotesDocumentCollection
Dim newsletter As NotesNewsletter
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set mailDb = New NotesDatabase( "", "" )
Call mailDb.OpenMail
Set collection = db.UnprocessedDocuments
Set newsletter = New NotesNewsletter( collection )
If ( collection.Count > 5 ) Then
Messagebox( "Please select five documents or fewer" )
Else
For j = 1 To collection.Count
Set doc = newsletter.FormatDocument( mailDb, j )
Call doc.Save( True, True )
Next
End If
End Sub
関連項目
NotesNewsletter クラス
用語集
フィードバック
ヘルプ
または
プロダクトユーザビリティ
ヘルプの使い方
すべてのヘルプ項目
用語集