LOTUSSCRIPT /COM/OLE のクラス


例:QueryOpenDocument イベント
次の例は、ユーザーの「Work area」を NotesUIView スクリプトに対してグローバルな変数に格納します。QueryOpenDocument イベントは、ユーザーがビューで文書を開こうとすると、文書のカテゴリを調べます。カテゴリがユーザーの「Work area」と同じではない文書は開かれません。

(Declarations)
Dim workArea As String

Sub Postopen(Source As Notesuiview)
 workArea = Inputbox ("What is your work area?", _
 "Work area", "Marketing")
End Sub

Sub Queryopendocument(Source As Notesuiview, Continue As Variant)
 Dim docs As NotesDocumentCollection
 Dim doc As NotesDocument
 Set docs = Source.Documents
 Set doc = docs.GetFirstDocument
 If Ucase (doc.Categories(0) ) <> Ucase (workArea) Then
   Continue = False
 End If
End Sub

関連項目