我使用LotusScript创建本地副本并将其添加到“复制和同步”页面。这是我的代码:
Dim uiws As New notesuiworkspace
Dim session As NotesSession
Dim db As NotesDatabase
Dim replica As NotesDatabase
Dim server As String
Dim dbname As String
Set Session = New NotesSession
Set db = session.CurrentDatabase
server = db.Server
dbname = db.FilePath
Set db = New NotesDatabase( "", "" )
Call db.Open(server , dbname )
If db.IsOpen Then
Set replica = New NotesDatabase("","")
If replica.OpenByReplicaID( "", db.ReplicaID ) Then
Print( replica.Title & " already has a local replica" )
Else
Set replica = db.CreateReplica( "", "C:\Data\Notes")
Print "Creating replica of C:\Data\Notes"
Call replica.Replicate( db.Server)
Call uiws.AddDatabase(server,dbname)
Call uiws.AddDatabase("",replica.FilePath)
End If
Else
Print "Unable to find database " + dbnames + " on server " + ServerName
End If
副本已成功创建,但未添加到“复制”页面。我可以做出哪些改变以便确实发生这种情况?