0
votes

I have a Notes application, with a form. On the form I have a richtext field. I have to remove all of the attachments and replace them with a picture in the rt field.

So far I have a "demo" app, which removes the attachments and replace them with the picture (I'm using NotesRichTextNavigator), but I can't save / restore their position.

Is there any way to do that ?

It's working, but this way I cannot set the NotesEmbeddedObject position in the rt field :

Set rtItem=doc.GetFirstItem(rtField)
Call rtitem.EmbedObject ( EMBED_ATTACHMENT, "", filePath)
Call doc.Save( True, False )

Thanks !

1

1 Answers

1
votes

If you really have to keep the position of the attachment then look at NotesDXLExporter and NotesDXLImporter. Export the document as DXL, replace attachments with the pictures in DXL and import it back to a document. Make sure that you use notesDXLExporter.RichTextOption=RICHTEXTOPTION_DXL