Lotus Domino Connection Document Button

Hi Readers,

Thought of sharing this little script button which helps in creating the connection document in users names.nsf.

Just create a buton in notes client with below script & send it to users.

Sub Click(Source As Button)
     Dim session As New NotesSession
     Dim db As NotesDatabase
     Dim view As NotesView
     Dim doc As NotesDocument
     Dim array(2) As String

     On Error Goto ErrProc

     Set db=session.GetDatabase(“”,”names.nsf”)
     Set view=db.GetView(“Connections”)
     Set doc=view.getdocumentbykey(“vikas/SRV/Svikas”, True)
     array(1)=”TCPIP”
     array(2)=”LAN0″

     If Not doc Is Nothing Then
           Call doc.Remove(True)
     End If
     Set doc=db.CreateDocument
     doc.form=”local”
     doc.ConnectionType=”0″
     doc.Destination=”vikas/SRV/Svikas”
     doc.LanPortName=array
     doc.ConnectionRecordFirst=”1″
     doc.OptionalNetworkAddress=”ip address

     Call doc.ComputeWithForm(False,True)
     Call doc.Save(True,True)
     Msgbox “Connections Settings have been updated in your local address
book.”
     Exit Sub

ErrProc:
     Msgbox Error$ + ” ” + Cstr(Erl)
     Exit Sub
End Sub

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s