GetAllUnreadDocuments/GetAllUnreadEntries method

Hi,

I hope I have posted this question to the right forum.

I am new to Lotus Notes and have been assigned the task of retrieving mails from Lotus Notes into our application (VB coded).

INFORMATION:

Lotus Domino Server: v8.5

Lotus Notes Client: v8.5

VB Language: v6.0

OS: Win XP Professional V2002 SP3

One WinXP box acting as the Domino server while the other has Notes Client installed along with VB.

PROBLEM:

I can use the APIs (that are got when Lotus Notes Client is installed) to send mails by writing an application in VB. However, I have problems when retrieving mails. Here is the code snippet of what Iam intending to do:

//START CODE****//

'References used are: “Lotus Domino Objects” and “Lotus Notes Automation Classes”

Dim session As domino.NotesSession

Dim Maildb As domino.NotesDatabase

Dim MailDoc As domino.NotesDocument

Dim dir As domino.NotesDbDirectory

Dim Inboxfolder As domino.NotesView



Set session = New domino.NotesSession

Call session.Initialize(<password>)



Set dir = session.GetDbDirectory(<server>)

Set Maildb = dir.OpenDatabase(<NSF file>)



Set Inboxfolder = Maildb.GetView("$Inbox")

Dim unreadmsgcollxn As domino.NotesNoteCollection

Set unreadmsgcollxn = Maildb.GetAllUnreadDocuments()

When GetAllUnreadDocuments method is accessed, VB pops an error stating “Object doesnt support this property or method” and the same happens if I use GetAllUnreadEntries() method of NotesView class.

QUESTION:

  1. Am I using the proper references in order to retrieve the unread documents?

  2. Are these JAVA methods and not exposed to COM?

  3. Any guidance on how to achieve in retrieving unread documents from a view.

Any help on this would be appreciated.

Thanks in advance

Regards