The EmbeddedObjects property of a NotesRichTextItem that 1) is large enough to be stored as multiple instances of the field on the document, and 2) is computed, not editable, is not returning all of the file attachments in the field. Instead, it seems to be returning only the attachments from the last instance of the rich text field.
I think I’ll log this with support, but I thought I’d post here first in case I’m doing something silly. Anybody seen similar behavior?
To reproduce:
-
create a form with an editable rich text field (e.g. “Body”)
-
create a document using the form and add file attachments to the rich text field until the field is stored multiple times (check the document properties from the view level)
-
run a form action to prompt with the file attachments’ names (see code below)
-
you will be prompted once for each attachment
-
edit the form to make the Body field computed to @ThisValue
-
open the document
-
run the same form action
-
you will be prompted for less than all attachments… the number of attachments found seems to depend on how many happen to be stored in the last instance of the field
Form action code:
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem
Set doc = ws.CurrentDocument.Document
Set rtitem = doc.GetFirstItem( "Body" )
Forall eo In rtitem.EmbeddedObjects
Msgbox eo.Source
End Forall
End Sub