Given the name of a file or an application, either:
public EmbeddedObject embedObject(int type, String class, String source, String name)
throws NotesException
int type
One of the following:
String class
Specify an empty string ("").
String source
Specify the name of the file to attach or embed.
String name
String. Name by which you can reference the EmbeddedObject later. Can be null.
EmbeddedObject
The newly attached file or embedded OLE/1 object.
Files can be attached on any supported platform.
Files can be embedded as OLE/1 objects on any supported platform (if the file is of a supported type, such as a Notes® application data file).
In an open document in edit mode (the NotesDocument via NotesUIDocument.Document), changes made to rich text will not appear on screen immediately as they would with fields of other types. There is no method to cause this update to occur. You must close and reopen the document to see changes.
EmbedObject method in LotusScript® NotesRichTextItem class
EditInsertObject @command in formula language
EditInsertFileAttachment @command in formula language