LOTUSSCRIPT /COM/OLE のクラス


例:TypeName プロパティ
この例は、新しい応答文書を作成する複合アプリケーションのボタンを示しています。PropertyBroker プロパティを検査し、Subject プロパティの名前とタイプ名に使用可能なものがあると、その値を新しい返答文書の [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 pb As NotesPropertyBroker
   Dim prop As NotesProperty
   Set pb = s.GetPropertyBroker()
   If Not pb Is Nothing Then
       prop = pb.getProperty("Subject")
       name$ = prop.Name
       type$ = prop.TypeName
       title$ = "Property " & name$ & " of type " & type$
   Else
       title$ = ""
   End If

   Print "The title of the Subject is:" & title$

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

End Sub