LOTUSSCRIPT/COM/OLE CLASSES


Examples: ReplaceItemValueCustomDataBytes method
This agent creates or replaces an item in the current document and assigns it the value of a byte array.

Sub Initialize
 Dim session As New NotesSession
 Dim doc As NotesDocument
 Dim item As NotesItem
 Dim bytes(9) As Byte
 Set db = session.CurrentDatabase
 Set doc = session.DocumentContext
 
 REM Create custom data
 For i = 0 To 9 Step 1
   bytes(i) = i + 65
 Next
 
 REM Create or replace custom data item
 Set item = doc.ReplaceItemValueCustomDataBytes( _
 "TenBytesItem", "TenBytesType", bytes)
 Call doc.Save(True, True, True)
End Sub

See Also