LOTUSSCRIPT /COM/OLE のクラス


例:ClearProperty メソッド
この例は、新しい応答文書を作成する複合アプリケーションのボタンを示しています。PropertyBroker プロパティを検査し、使用可能なものがあると、Subject プロパティの値を検査し、プロファイル文書にその情報を保存します。最後に Subject プロパティはクリアされ、このプロパティの別の応答が作成できなくなります。応答文書の postopen イベントはプロファイル文書を検査し、新しい応答文書の Subject フィールドにその値を入力します。

Sub Click(Source As Button)
Dim s As New NotesSession
Dim db As NotesDatabase
Set db = s.CurrentDatabase
Dim ws As New NotesUIWorkspace
Dim uiv As NotesUIView
Set uiv = ws.CurrentView
viewname$ = Strtoken(uiv.ViewName," ",1)
Dim pDoc As NotesDocument
Set pDoc = db.GetProfileDocument("tmpProfile")
pDoc.viewtitle = viewname$
Call pDoc.Save(True,False)

Dim pb As NotesPropertyBroker
Set pb = s.CreatePropertyBroker()
If Not pb Is Nothing Then
subject$ = pb.getPropertyValue("Subject")
Else
subject$ = ""
End If

Dim uidoc As NotesUIDocument
Set uidoc = ws.ComposeDocument("","","Response")
Call uidoc.FieldSetText("Subject",subject$)

Call pb.ClearProperty("Subject")

End Sub