Hello all, I have included the following code in a button that was sent out to various users. This is a child company and the first database I have created on their domain server, which is cross-certified with our domain. It works fine from my workstation. So far, all who have used the button have called with a “Notes Error” dialog window…relaying the error text as “not authorized to create replicas” or something very similar. The code obtains a notesdatabase handle, creates the replica, then initializes the database. The error is generated instantly. I have looked at the server document and do not see much different from the server documents of other existing domino servers. Is this error related to the access they have to their individual workspaces? Thanks.
declarations:
Declare Sub keybd_event Lib “user32.dll” (Byval bVk As Integer, Byval bScan As Integer, Byval dwFlags As Integer,Byval dwExtraInfo As Integer)
Sub Click(Source As Button)
Dim workspace As New Notesuiworkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim replica As NotesDatabase
Set db = session.GetDatabase("servername", "database.nsf")
Set replica = db.CreateReplica( "", "database.nsf" )
Call workspace.OpenDatabase("", "database.nsf")
keybd_event 18,0,0,0 ' Alt key down
keybd_event Asc("F"),0,0,0 ' F key down -- invokes file menu
keybd_event Asc("R"),0,0,0 ' R key down - Select All
keybd_event Asc("R"),0,2,0 ' R key up
keybd_event Asc("R"),0,0,0 ' R key down - Select All
keybd_event Asc("R"),0,2,0 ' R key up
keybd_event 18,0,2,0 ' Alt key up
keybd_event Asc("0D"),0,0,0 ' Enter key down - Select All
keybd_event Asc("0D"),0,2,0 ' Enter key up
Call workspace.adddatabase("", "database.nsf")
End Sub