能不能直接用Set dc=view.getalldocuments阿?

waq0544 2003-12-11 06:32:09
我想取出视图中的所有文档,一定要用
Set dc=view.getalldocumentsbykey()吗?
...全文
37 10 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
thomasxdx 2003-12-12
  • 打赏
  • 举报
回复
set doc = view.getfirstdocument
do while not doc is nothing
……
Set doc = view.getnextdocument(doc)
loop

这样可以吗!
chenyg2000 2003-12-12
  • 打赏
  • 举报
回复
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim vc As NotesViewEntryCollection
Dim entry As NotesViewEntry
Dim doc As notesdocument


Set db = session.CurrentDatabase
Set view = db.GetView("($All)")
Set vc = view.AllEntries
Set entry= vc.getfirstentry

While Not entry Is Nothing
Set doc=entry.document
Msgbox doc.aaa(0)
Set entry=vc.getnextentry(entry)
Wend
waq0544 2003-12-12
  • 打赏
  • 举报
回复
谢谢大家了,用 chenyg2000(icerain)的就可以!


set doc =view.getfirstdocument()
while not doc is Nothing
你的代码 …………
set doc =view.getnextdocument(doc)
就和原来做的不符了。(虽然更简单)
luota163 2003-12-12
  • 打赏
  • 举报
回复
可以通过修改目标视图的第一个排序列来达到目的
xiaoyuer0851 2003-12-12
  • 打赏
  • 举报
回复
Set dc=view.getalldocumentsbykey()

这样的话,只能够通过key 来从view 中取啊,如果不满足key ,那么肯定就取不出来
和楼主的意思不一致啊,
为什么不使用
set doc =view.getfirstdocument()
while not doc is Nothing
你的代码 …………
set doc =view.getnextdocument(doc)

来做呢 ?
waq0544 2003-12-11
  • 打赏
  • 举报
回复
不行啊,各位大哥,notesviewEntry好像只能得到entry的数量等等,而我想从DC中取出document来做其他事情:Set doc=DC.getfirstdocument()
waq0544 2003-12-11
  • 打赏
  • 举报
回复
谢谢chenyg2000(icerain) ,我试一下!
waq0544 2003-12-11
  • 打赏
  • 举报
回复
to : thomasxdx(星星过客)

是啊,我是改前面留下来的程序的,所以也用了DC.
chenyg2000 2003-12-11
  • 打赏
  • 举报
回复
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim vc As NotesViewEntryCollection
Set db = session.CurrentDatabase
Set view = db.GetView("view")
Set vc = view.AllEntries
thomasxdx 2003-12-11
  • 打赏
  • 举报
回复
是的。
一定要用到DC吗?
可不可以通过循环来实现你要的功能呢?

536

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 Exchange Server
社区管理员
  • 消息协作社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧