使用 C# 读取 NSF 文件中的 Lotus Notes 文档和项目
如何使用 C# 和使用 interop.domino 从 NSF 文件中获取 Lotus Notes 收件箱中的所有 Lotus Notes 文档(例如邮件及其内容) .dll?
我想使用以下代码片段:
Domino.NotesSession m_session = null;
...
this.m_session = new Domino.NotesSession();
this.m_session.Initialize("");
Domino.NotesDatabase db = null;
this.m_session.GetDatabase("", "C:\test.nsf", false);
Domino.NotesDocumentCollection col = db.AllDocuments;
for (int i = 0; i < col.Count; ++i)
{
Domino.NotesDocument doc = col.GetNthDocument(i);
...
}
如何访问每个文档的项目?例如,我想要主题、人物、日期、时间……
如何迭代文档的所有项目?
如何提取附件?
NotesSQL ODBC 驱动程序是 COM API 的良好替代品吗?
How can I get all Lotus Notes documents (e.g. mails and their content) from a Lotus Notes inbox from an NSF Files with C# and the usage of interop.domino.dll?
I want to use the following snippet:
Domino.NotesSession m_session = null;
...
this.m_session = new Domino.NotesSession();
this.m_session.Initialize("");
Domino.NotesDatabase db = null;
this.m_session.GetDatabase("", "C:\test.nsf", false);
Domino.NotesDocumentCollection col = db.AllDocuments;
for (int i = 0; i < col.Count; ++i)
{
Domino.NotesDocument doc = col.GetNthDocument(i);
...
}
How can I access the items of each document? For example I want subject, who, date, time,...
How can I iterate throug all items of a document?
How can I extract attachments?
Is the NotesSQL ODBC driver a good alternative to the COM API?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这应该有效。 Lotusscript 中的 GetItemValue 方法返回一个值数组,但通常您只需要第一个索引处的值。我不确定它与 COM 的工作方式是否相同,但调试器可以帮助您弄清楚这一点。
此外,如果您要处理大量文档,则使用 GetFirstDocument/GetNextDocument 方法进行迭代比使用 GetNthDocument 方法要快得多。
This should work. The GetItemValue method in Lotusscript returns a value array, but usually you're just going to need the value at the first index. I'm not sure if it works the same way with COM, but the debugger can help you figure that out.
Also if you're processing a lot of documents it is much faster to iterate using the GetFirstDocument/GetNextDocument methods than it is to use the GetNthDocument method.