These are really three separate questions.
- Can you tell whether the field is totally empty?
Yes -- refer to Validating a Rich Text field before saving the document and Validating entry of a Rich Text field. These are slight variations on the same technique.
- Can you tell whether the field contains attachments?
Yes -- refer to Domino Designer 6 Developer's Handbook, page 727, for an example that you can adapt. This example actually checks to make sure no attachments exceed a size limit, but it's easy enough to see how to tell whether there are no attachments. This example uses an On Error trap to detect the absence of attachments, but you can also use the expression "IsEmpty(rtf.EmbeddedObjects."
Note: Embedded objects can contain either attachments or OLE objects, so if you want to make sure it's an attachment, not an object, you must check the type, as shown in the example.
- Can you tell whether the field contains images?
Not easily. This sort of thing requires the Notes C API or third-party tools that employ the C API, such as Midas rich text LSX from Genii Software.
This was first published in April 2003