How to combine rich text from compound_text field to my buffer and then write the field?

Hello,

There are some good examples in the notes api for reading and writing rich text. And the code can be kind of long if creating the CD buffer manually. I think my question is easier and requires less code.

I am using the notes api sample called dynamic. It builds a buffer of CD items (para, ref, cdtext, etc) and then uses NSFItemAppend() to write this into a field named RICH_TEXT.

Just before this NSFItemAppend() function is ran, I have inserted code to open another note that has a rich text field in it. Now there are examples of how to read these fields and it does this by converting the data to text. But I am thinking since the data is already rich text I should be able to simply get this rich text combine it to the buffer, move the pointer of the buffer the length of the field and then continue…

In short, I am manually building compound text and then would like to get compound text from the a field and combine this with my manually created buffer and then write this the note.

Can someone point me in the right direction? I was thinking about using NSFItemInfo() which can get the blocked and length but maybe this is wrong direction.

Maybe a simpler example could still help me and might be easier to demonstrate like to get two compound fields from a note, combine them, and then write back as a new item.

Thank you

Subject: figured this out…

Used the easy rich example where they add rich text to a handle and then use the Assimlate___ function to append a rich text field from a note. So I just tweak this to work the way I needed it to be.