Hello,
I have a problem embedding or attaching a file into an existing field.
The Form contains a field called “Anghangfeld” - this field is RichText.
I try to embed an object or attach a file into this (existing!) field this way:
Dim wsp As New NotesUIWorkspace
Dim uidoc As notesuidocument
Dim doc As notesdocument
Dim db As NotesDatabase
Dim Anhang As NotesEmbeddedObject
Set uidoc = wsp.CurrentDocument
Set doc = uidoc.Document
Set AFIT = doc.GetFirstItem("Anhangfeld")
Set Anhang = AFIT.EmbedObject ( EMBED_ATTACHMENT, "", "c:\motorola_pebl.pdf")
Call doc.Save(True,False,True)
But the Attachment is NOT placed in the exisiting field (Anhangfeld); it is always stored in a $FILE beyond the last line of the document
And: there is not difference if the field “Anhangfeld” is editable or calculated.
Can anyone give me a hint how to solve this problem?