提前感谢您的帮助!
我最终尝试从基于主题行的特定电子邮件中提取信息。为了解决这个问题,下面的代码是一个拉出主题行的测试。然而,它运行了132个文档,没有一个主题被标识为除空白之外的任何内容。使用同样的Initialize和GetDatabase方法,我成功地通过Lotus Notes发送了电子邮件,所以我不认为我是在寻找错误的文档。下面的代码是用VBA通过Excel编写的,有Lotus Notes8.5
有没有人看到我在浏览Notes数据库中的所有文档时除了空白什么也得不到的原因?
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 Subhttps://stackoverflow.com/questions/44504891
复制相似问题