Images in Rich Text Items
As I described some hours ago I had a problem. I am sending e-mails from a Notes application which must contain a predefined footer which is stored in a rich text field of a setup document. In my code I use the AppendRTItem method of NotesRichTextItem to append the rich text item containing the footer to the body of the mail. All images in the footer did not display, instead I was prompted with "Note item not found" error messages.
I was nearly running out of ideas when I finally thought to check out the database properties. For some reason the option "Display images after loading" was turned on. I turned it off and tested again. Nope. I then edited the document storing the formatted footer and imported the same image again. Now it works. To my great amazement.
After some testing it turns out that you cannot programmatically copy images from rich text items which have been created while the "Display images after loading" database property is on. The same applies to lookups to these images. To display the contents of a rich text item from another document you can create a computed for display text field (or a rich text field) and retrieve the rich text field's content using a @DbLookup (see Technotes "@DbLookup and @DbColumn Questions and Answers" and "@DbLookup fails to return Rich Text field"). This also does not work if the property was turned on when the rich text item was saved.









