EXPERT RESPONSE
I am not aware of any programmatic way to modify the Replica tab, and I'm certain that this would be a bad idea even if you could do it. Fortunately, it's not needed.
What you have to understand is that the replica tab is function of the Notes Workspace, exposed through the NotesUIworkspace object. Creating a replica of a local database does not update the Replica tab, because it does not add an icon to the workspace the way creating a replica through the UI would do.
Lotus Notes databases only appear on the replicator page when you have icons on your workspace for a local copy and a server copy of the same database. But the AddDatabase method of NotesUIworkspace does, so the following code will create a replica, add an icon for it to your workspace, and incidentally add it to the Replica tab:
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim pab As New NotesDatabase("","names.nsf")
Call pab.CreateReplica("Dev001","lncenter\MyPab.nsf")
Call ws.AddDatabase("Dev001","lncenter\myPab.nsf")
This assumes that you already have an icon for the local replica. If not, you'll have to add it first, by passing the null string ("") to the server parameter of AddDatabase.
Do you have comments on this Ask the Expert Q&A? Let us know.
Related information from SearchDomino.com:
Learning Guide: LotusScript
FAQ: LotusScript
FAQ: Address book and directory management
Reference Center: LotusScript tips and resources
|