views:

211

answers:

1

Is there something like a doc.GETITEMVALUE("Attachment")(0) ?

Also, I can't find any documentation for the domino API. Does anyone have a good resource for this?

+1  A: 

You can access all file attachments on a NOtesDocument object using the document's EmbeddedObjects property. This will provide a handle to a collection of NotesEmbedded objects that you can iterate over. For each NotesEmbeddedObject, you should check the Type property, to see if its actually a file attachment (it could also be an embedded OLE object - see details here). To save an attachment to the file system, you can use the ExtractFile method of the EmbeddedObject.

The Notes "Designer Help" is found here: http://publib-b.boulder.ibm.com/lotus/c2359850.nsf/Main?OpenFrameSet There is a section in there for "LotusScript/COM/OLE Classes" which should be helpful, and there is some sample code under each class.

EDIT: Actually, the EmbeddedObjects attribute of NotesDocument class will only include embedded OLE oebjcts. To get file attachments, you need to access the NotesRichTextItem object for the appropriate field - the EmbeddedObjects atribute of the NotesRichTextItem class does include file attachments. See this post for sample code.

Ed Schembor
Thanks! I'm still having a bit of a problem getting it to work though. Can you take a look at my other question? http://tinyurl.com/y9wofwb
Lee Warner