0
votes

How to get all unread mails from a particular view(eg $Inbox) of lotus notes database using vbscript?

    Set objNotesSession = CreateObject("Lotus.NotesSession")
    objNotesSession.Initialize(strPassword)
    Set objNotesdb = objNotesSession.GETDATABASE(strMailServer, 
                       strMailDBName) 
    If Not objNotesdb.IsOpen = True Then 
        Call objNotesdb.Open 
    End If
    Dim view
    Dim vec
    Set view = objNotesdb.GetView("($Drafts)")
    vec = view.GetAllUnreadEntries()

But for GetAllUnreadEntries() I am getting Object doesn't support this property or method

1

1 Answers

1
votes

You can get all unread documents from the Inbox by using the GetAllUnreadEntries method in the NotesView class. The result will be returned as a NotesViewEntryCollection object.