LotusScript to C API Programming Guide

rtLib Domino Rich Text Management template
Show details for ContentContent
Ready-to-use samples
Show details for Online resourcesOnline resources
Happy readers




Hosted by Prominic.NET, Inc.
Main topic: ODSReadmemory NotesRichtext item

ODSReadmemory NotesRichtext item (by NG KEK WEE, 11/18/2006 11:28:02 PM)


I'm trying to read the content of notesrichtext item(body) in LotusScript as bytes using the example in the book. I had to save the document otherwise NSFItemInfo does not work, Is there a workaround? Also after saving the document What type(2nd parameter in ODSReadmemory) should I pass to return as bytes after an ODSReadMemory?

just a thought is this possible Can I combine the below code with a uidoc.GoToField( "body" ) then a uidoc.SelectAll & uidoc.Copy. Then read this memory using ODSReadMemory, but do not know how to pass the source to ODSReadmemory)

Dim memman As New memoryManager

Dim item_blockid As Blockid

Dim value_blockid As Blockid

Dim value_datatype As Integer

Dim value_len As Long


Dim p As Long

Dim iType As Integer

Dim w As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Set uidoc = w.CurrentDocument

Set doc = uidoc.Document

If NSFItemInfo (doc.handle, "Body", Len("Body"), item_blockid,_ value_datatype, value_blockid, value_len) =0 Then


p = memman.lockObject (value_blockid.pool) + value_blockid.block

W32_ODSReadMemory p, ODS_WORD, iType, 1

Print i.name, "type=" &iType, "length=" &value_len

End If


End Sub