Is there something like doc.GETITEMVALUE("Attachment")(0)
? Also, I can't find any documentation for the Domino API. Does anyone have a good resource for this?

- 21,850
- 21
- 110
- 188

- 2,543
- 4
- 30
- 45
1 Answers
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.

- 1
- 1

- 8,090
- 8
- 31
- 37
-
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 Nov 25 '09 at 18:34