LotusScript:在文件夹中移动多个文档

dra*_*ayl 1 lotus-notes lotusscript lotus-domino

我有一个按钮"移动文档",据说它应该将所选文档移动到另一个文件夹.我使用PutAllInFolder但它只将文档复制到"移动文档"文件夹.是否有另一种方法可以完全将它们移动到另一个文件夹或视图?

这是我的代码:

  Sub Click(Source As Button)
   Dim session As New notessession
   Dim dbCur As notesdatabase
   Set dbCur = session.currentdatabase

   Dim collSelected As notesdocumentcollection
   Set collSelected = dbCur.UnprocessedDocuments

   Call collSelected.PutAllInFolder("Move Document")
   Dim uiw As New notesuiworkspace
   Call uiw.viewrefresh
  End Sub
Run Code Online (Sandbox Code Playgroud)

Per*_*ten 7

在集合上使用RemoveAllFromFolder方法.

  • 只是添加一些说明:Lotus Notes中的文件夹只是包含文档的链接集合.因此,您可以根据需要同时在多个文件夹中放置文档,而无需重复空间.这就是为什么"PutInFolder"或"PutAllInFolder"正是如此:它将文档放在文件夹中...它不会将其从原始文件夹中删除. (2认同)