将文档移动到不同的类别
Moving documents to different categories
我正在尝试在 LotusScript 中将文档从一个类别移动到另一个类别。
比如我有2个人,他们都买了东西:
约翰:
采购1
采购2
鲍勃:
采购3
购买4
而且我想使用代理将 Bob 的所有购买转移到 John 的列表中。我对 LotusScript 没有任何经验,我不希望您为我编写代码。有人可以告诉我在哪里可以找到材料或指南来解决这个问题,或者至少给我一个方向吗?
您可以构建一个 Lotus 脚本代理来处理视图中标记的文档
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collDoc As NotesDocumentCollection
Dim doc As NotesDocument
Dim category As variant
Set db = session.Currentdatabase
'Get the selected documents
Set collDoc = db.Unprocesseddocuments
If(collDoc.Count > 0)Then
Set doc = collDoc.Getfirstdocument()
While Not doc Is Nothing
'Get the current categories
'Get the new categories
'Set the new categories (+ use some of the old categories)
'Save the changes
Set doc = collDoc.Getnextdocument(doc)
Wend
End If
我的示例代码向您展示了如何获取标记文档的句柄。在 while 循环中,您必须更改类别字段以将文档移动到新类别。
我正在尝试在 LotusScript 中将文档从一个类别移动到另一个类别。
比如我有2个人,他们都买了东西:
约翰: 采购1 采购2 鲍勃: 采购3 购买4
而且我想使用代理将 Bob 的所有购买转移到 John 的列表中。我对 LotusScript 没有任何经验,我不希望您为我编写代码。有人可以告诉我在哪里可以找到材料或指南来解决这个问题,或者至少给我一个方向吗?
您可以构建一个 Lotus 脚本代理来处理视图中标记的文档
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collDoc As NotesDocumentCollection
Dim doc As NotesDocument
Dim category As variant
Set db = session.Currentdatabase
'Get the selected documents
Set collDoc = db.Unprocesseddocuments
If(collDoc.Count > 0)Then
Set doc = collDoc.Getfirstdocument()
While Not doc Is Nothing
'Get the current categories
'Get the new categories
'Set the new categories (+ use some of the old categories)
'Save the changes
Set doc = collDoc.Getnextdocument(doc)
Wend
End If
我的示例代码向您展示了如何获取标记文档的句柄。在 while 循环中,您必须更改类别字段以将文档移动到新类别。