LOTUSSCRIPT /COM/OLE のクラス


例: GetValueCustomDataBytes メソッド
次のエージェントは、現在の文書のカスタムデータを取得します。カスタムデータは TenBytesItem という名前のアイテムにあり、書き込まれたときに TenBytesType というデータ型名が設定されています。

Sub Initialize
 Dim session As New NotesSession
 Dim doc As NotesDocument
 Dim item As NotesItem
 Dim customData As String
 Set db = session.CurrentDatabase
 Set doc = session.DocumentContext
 If doc.HasItem("TenBytesItem") Then
   Set item = doc.GetFirstItem("TenBytesItem")
   If item.Type = USERDATA Then
     bytes = item.GetValueCustomDataBytes("TenBytesType")
     Forall b In bytes
       customData = customData + Chr(b)
     End Forall
     Messagebox customData,, "Custom data"
   Else
     Messagebox "Not custom data",, "TenBytesItem"
   End If
 Else
   Messagebox "No item in document",, "No TenBytesItem"
 End If
End Sub

関連項目