I’d like get text from all fields “$ScriptLib” in ScriptLibrary.I wrote this code, but it’s not work - please, help.
Type BlockID
hPool As Long
Block As Integer
End Type
Declare Function NSFItemInfo Lib “nnotes” Alias “NSFItemInfo” ( _
Byval hNote As Long, _
Byval itemName As String, _
Byval itemNameLen As Integer, _
itemBlockID As BlockID, _
valueDataType As Integer, _
valueBlockID As BlockID, _
valueLen As Long ) As Integer
Declare Function NSFItemInfoNext Lib “nnotes” Alias “NSFItemInfoNext” ( _
Byval hNote As Long, _
Byval previousItemBidPool As Long, _
Byval previousItemBidBlock As Long, _
Byval itemName As String, _
Byval nameLen As Integer, _
itemBlockid As BlockID, _
valueDataType As Integer, _
valueBlockID As BlockID, _
valueLen As Long ) As Integer
Declare Function NSFItemConvertValueToText Lib “nnotes” ( _
Byval valueType As Integer, _
value_bid As BlockID, _
Byval value_len As Long, _
text_buf As String, _
Byval text_buf_len As Long, _
Byval separator As Byte ) As Integer
Sub Click(Source As Button)
Dim s As New NotesSession, cdb As NotesDatabase, doc As NotesDocument
Set cdb = s.Currentdatabase
Set doc = cdb.GetDocumentByUNID( "F09A70772AE7472944257CC500277D4F" )
Const ITEM_NAME = "$ScriptLib"
Dim iBlock As BlockID, dType As Integer, vBlock As BlockID, vLen As Long
NSFItemInfo doc.handle, ITEM_NAME, Len( ITEM_NAME ), iBlock, dType, vBlock, vLen
While Not ( vLen = 0 )
Msgbox vLen ' return valid value
Dim code As String
code = Space( vLen )
NSFItemConvertValueToText dType, vBlock, vLen, code, Len( code ), 0
Msgbox Trim( code ) ' empty string
NSFItemInfoNext doc.handle, iBlock.hPool, iBlock.Block, ITEM_NAME, Len( ITEM_NAME ), iBlock, dType, vBlock, vLen
Wend
End Sub
What I must do for get really value?
Best regards, Rombs.