Unable to Read Rich Text (TYPE_COMPOSITE) Field in HCL Notes C API — Always Empty

Hi everyone,

I’m working with the HCL C API Toolkit (version CAPIToolkit_1202_MP1) to extract rich text content from NSF documents. However, I’m facing a consistent issue where the Rich Text field is either not found or returns empty, even though the field exists in the document when viewed in the Notes client.

I’m using NSFItemInfo() to locate the item named "Body" or "Comment" (which is a Rich Text field). Then, I check if the item type is TYPE_COMPOSITE. Here’s a simplified version of my code:

BLOCKID item_blockid;
WORD data_type;
DWORD item_value_len;

STATUS error = NSFItemInfo(
hNote,
“Comment”,
(WORD)strlen(“Comment”),
NULL,
&data_type,
&item_blockid,
&item_value_len
);

if (error == NOERROR && data_type == TYPE_COMPOSITE) {
printf(“Found Rich Text field\n”);
// Proceed to read using Compound Text API (planned)
} else {
printf(“Rich Text field not found or not composite\n”);
}

i have also check this github wher richtext read formate available but this is also not working can you please check and give me any solution, domino-c-api-samples/samples/richtext/rrich/rrich.c at main · HCL-TECH-SOFTWARE/domino-c-api-samples · GitHub

Thanks

hi team,

any update on this ?

Thanks

Hi Ritu,

The Domino server and the Notes client both use calls NSFItemInfo internally and it is working there so we know that NSFItemInfo works in 12.0.2.

I assume in the example you changes the called to NSFItemInfo from “RichText” to “Body” or “Comment” to get it to work with the DB you are trying to pull the data from.
Can you please open a case with HCL Support for this issue and supply the DB that has the Body and Comment fields that we are seeing the issue with?

Paul Albright
Technical Team Lead - Application Development Team
Notes/Domino/HEI/DLEAP/LEAP/DRAPI
Customer Support