Returns a representation of a file attachment. You can use this method to find file attachments that are not contained in a rich text item (such as an attachment in a Release 2 database) as well as file attachments that are contained in a rich text item.
public EmbeddedObject getAttachment(String filename)
throws NotesException
String filename
String. The file name of the file attachment.
EmbeddedObject
A representation of the file attachment. Returns null if an attachment by the specified name is not found.
The Parent property for the returned EmbeddedObject returns null, since it was not accessed through a RichTextItem.
GetAttachment method in LotusScript NotesDocument class
See examples