如何使用 .NET 访问用户在 Lotus Notes 中创建的文件夹的内容?
我正在获取所有视图(文件夹)的内容。如收件箱、日历、待办事项等
如标题中所述,我想访问我的用户创建的文件夹的内容。 例如“Folder1”和子文件夹“ABC”
我可以这样做:
NotesView folder = _notesDatabase.GetView("(Folder1)");
NotesDocument docFolder = folder.GetFirstDocument();
对于子文件夹: NotesViewfolder = _notesDatabase.GetView("(Folder1/ABC)");
但这里我需要指定文件夹名称。该名称无法提前知道。 所以我不能对其进行硬编码。
有没有办法只获取用户创建的文件夹和子文件夹的列表?
I am getting contents of all views (Folders).Like Inbox,Calendar,ToDo e.t.c.
As mentioned in Title i want to access contents of Folders created my user.
For Example "Folder1" and sub-folder "ABC"
I can do it as:
NotesView folder = _notesDatabase.GetView("(Folder1)");
NotesDocument docFolder = folder.GetFirstDocument();
For sub-folder : NotesView folder = _notesDatabase.GetView("(Folder1/ABC)");
But here i need to specify folder name.Which can't be known in advance.
So i can't hard code it.
Is there any way to get only list of User created Folders and Sub-folders?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要迭代邮箱中的所有文件夹,请使用
NotesDatabase.Views
和isFolder
属性。然后您可以显式排除 ($Inbox)、($Junkmail) 等。或者使用试探法,名称以“(”开头的文件夹是系统文件夹:Ken Pespisas 建议使用
isPrivate
更好,除非允许用户创建共享文件夹,否则将有效。我不确定这是否是默认的 Notes 访问权限。To iterate over all folders in a mailbox, use
NotesDatabase.Views
and theisFolder
property. Then you can either explicitly exclude ($Inbox), ($Junkmail) et.c. or use the heuristic that folders where the name begins with "(" are system folders:Ken Pespisas suggestion to use
isPrivate
is nicer and will work unless users are allowed to create shared folders. I'm not sure if this is the default Notes access or not.您可以使用 NotesDatabase Views 属性获取视图集合。
如果循环访问该集合,则可以检查每个视图的 IsPrivate 属性以查看它是否是用户创建的私有视图。在 Lotusscript 中它看起来像这样
You can get a collection of views using the NotesDatabase Views property
If you loop through that collection, you can inspect each view's IsPrivate property to see if it is a private view created by the user. In Lotusscript it would look like this