Thanks in advance for any help!
I'm ultimately trying to pull information from specific emails based on subject line. Working up to the problem the below code was a test to pull up a subject line. However it runs through 132 documents without a single subject identified as anything other than blank. Using this same Initialize and GetDatabase method I successfully sent emails through Lotus Notes, so I don't think I'm after the wrong docs somehow. Below code written in VBA through Excel have Lotus Notes 8.5
Anyone see a reason why I would get nothing but blanks going through all of the docs in the Notes Database?
Sub LotusGetView()
Dim Nsess As New NotesSession
Dim Ndb As NotesDatabase
Dim Ndocs As NotesDocumentCollection
Dim Ndoc As NotesDocument, docNext As NotesDocument
Dim c As Long
Dim memSubj As Variant
Nsess.Initialize
Set Ndb = Nsess.GetDatabase("", "names.nsf")
Set Ndocs = Ndb.AllDocuments
c = 1
Set Ndoc = Ndocs.GetFirstDocument
Do Until Ndoc Is Nothing Or c = 1000
Set docNext = Ndocs.GetNextDocument(Ndoc)
memSubj = Ndoc.GetItemValue("Subject")(0)
If memSubj <> "" Then
MsgBox memSubj
End If
Call Ndoc.Remove(True)
Set Ndoc = docNext
c = c + 1
Loop
MsgBox c
End Sub