I am trying to insert some inline image and inline attachment inside Notes document, using Rich Text format by lotus.domino package Java API, and send it.
The code of inserting is as below.
// Insertion by RichTextItem.embedObject()
RichTextItem rti = (RichTextItem) doc.getFirstItem("Body");
RichTextNavigator rtnav;
rtnav = rti.createNavigator();
rtnav.findFirstElement( .../*Somewhere inside document*/ );
rti.beginInsert(rtnav);
rti.embedObject(EmbeddedObject.EMBED_ATTACHMENT,null, "C:\\TEMP\\abc.jpg", "InlineImageOrAttachment"); // insert file which is jpg/png/pdf/doc...etc
rti.endInsert();
Right now I have got:
What I want to have is:
Thanks in advance.
Here is a LotusScript function I found on the net. the same classes should be available in Java: