Access R8 Mail database with VB6

Can someone point me to some VB code to access the mail box, read the subject line, detach an attachment, mark the message read, and move to the next message

Subject: Do it in LotusScript first

I don’t know what your background in Lotus Notes application development is, but if you can code a solution in LotusScript and get it working, you are 90% on the way to copying and pasting it to VB and having it work from there.

Start by looking in the Domino Designer help at the example for the MarkRead method of the NotesDocument class. To sequentially process all unread documents in a view it is just a matter of coding a While loop based on GetNextEntry. To get a handle to the mail file, use the OpenMail method (this will need to change later when you go to VB)

To detach the file, use the GetFirstItem method of NotesDocument to get a handle to the Body field (rich text), then you can use the ExtractFile method of the NotesEmbeddedObject class to detach the files in it.