Requires Free Membership to View
Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.
I have added a LotusScript example below, which will guide you in the proper direction. Using the EmbeddedObjects property of the Notes document or Rich Text item, you get a list of embedded objects in your document (i.e., attachments). Then, by using the GetAttachment method, you get a handle to an attachment, which is stored in the class type of NotesEmbeddedObject. This class has properties such as Remove, ExtractFile etc.
Dim db As NotesDatabase Dim view As NotesView Dim doc As NotesDocument Dim object As NotesEmbeddedObject Set db = New NotesDatabase ( "server", "db" ) Set view = db.GetView( "viewname" ) Set doc = view.GetLastDocument Forall o In doc.EmbeddedObjects Set object = doc.GetAttachment( o ) Call notesEmbeddedObject.ExtractFile ( "path to save file to" ) Call notesEmbeddedObject.Remove End Forall
This was first published in October 2003