我问了一个问题(Lotus Notes 7 - copy / move docs. ( parent & response docs ) without changing the UNID ?),我收到了一个帮助我很多的答案!谢谢Knut Hermann!
它运作正常,它是一个致力于选择文档的代理。我想知道是否有可能创建一个每天运行一次的计划代理?这意味着用户不应手动选择文档并运行代理。
感谢您抽出宝贵时间和分享信息!
答案 0 :(得分:1)
是的,你可以。看here。您可以在代理商的属性中设置计划:
您可以选择要选择的文件。在示例中将选择所有数据库的文档。如果您选择“无”,则由您自行选择代理商代码中的文档。 NotesDocumentCollection。
对于您的情况,最简单的方法是选择所有文档并添加if语句来测试文档是否还不在目标数据库中:
Set docSource = col.Getfirstdocument()
While Not docSource Is Nothing
If docTarget.GetDocumentByUNID(docSource.UniversalID) Is Nothing then
Set docTarget = dbTarget.Createdocument()
Call docSource.Copyallitems(docTarget, True)
docTarget.UniversalID = docSource.UniversalID
Call docTarget.save(True, False)
Set docSource = col.Getnextdocument(docSource)
End If
Wend