Displaying HTML in RichText control

How can I set the contents of a RichText control programmatically and have the control display the formatted HTML? For instance, I would like to set the value of the control to “Some BOLD text.”, and have the control display the formatted text with the word ‘BOLD’ actually in bold. I have tried every way I can think of.

Subject: What is the Rich Text Item’s storage type?

on the second tab of the field’s properties you might try setting the storage to ‘store contents as HTML and MIME’.

When that is set, and there is a in the data, notes’ HTML formatting routines understand you want the text to be bolded.

When that is not set, then you see the characters are treated as just text in the data stream, and the HTML formatting routines escape each character as needed, so what you typed is what shows up in the browser.

Using notes on an Item that is not storing HTML and MIME, if you highlight some text and bold it, the notes editor stores that formatting information in a much different way, but the HTML formatting routines know how to translate that formatting info and insert it into the HTML stream.

So you need to pick just one of the approaches - either use a RichTextItem to create bold text, or create a MIMEEntity and set its content to some valid HTML.

Subject: Storage type is HTML or MIME

This doesn’t seem to make any difference.

I neglected to mention also that I am using the C++ API. There doesn’t seem to be a MIMEEntity analog in the C++ API

Subject: sorry, not familiar with c++ api

There must be a RichTextItem - is there an analog to the RichTextStyle class? That, along with notesSession.ConvertMIME=true should allow you to bold existing values.

If not, a switch to the java api in a webqueryopen or webquerysave agent might be your fastest path.