I am creating a server replica of a Lotus Notes user's Personal Address Book using LotusScript. How do I add the...
icon to the Replication tab? This does not happen when the replica is created. Is it possible to modify the Replica tab via LotusScript?
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:
Related Q&A from Cregg Hardwick
A user wants to know if it's possible for LotusScript to read an attachment in a Notes document without first detaching it. Find out our expert's ...continue reading
Learn about different options using LotusScript code and Formula language to customize the principal field of outgoing Lotus Notes email messages.continue reading
Read about merging cells in a Microsoft Word table using LotusScript and an Excel example, along with the thought process that goes along with it.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.