Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

automatically update connection document

Status
Not open for further replies.

dc214

MIS
Apr 22, 2002
1
0
0
US
Our organization has updated the ip address of one of its servers. In order for our users to be able to connect, a connection document needs to be edited or a new one created. Does anyone know of a way to do this automated? I can't stand the thought of going around to each pc....
 
I have a database that will update config. You send it out in an email. Email me at mrunnebaum@rrsc.com and I will send it to you. [bunny]
 
Not automated but you can send a button in a mail to do the job. I used this in the past.
Code is like :

Sub Click(Source As Button)
Const ConnectionDocumentName = "server.xyz.com"
Dim session As New NotesSession
Dim ConnectionsView As NotesView
Dim AddressBook As NotesDatabase
Dim ConnectionDoc As NotesDocument
Set AddressBook = session.GetDatabase("","names.nsf")
If (AddressBook Is Nothing) Then
Msgbox "Unable to find local address book", 16, "Connection Update"
Exit Sub
End If
Set ConnectionsView = AddressBook.GetView("Connections")
Set ConnectionDoc = ConnectionsView.GetDocumentByKey(ConnectionDocumentName)
If (ConnectionDoc Is Nothing) Then
Msgbox "Unable to find the Connection document", 16, "Connection Update"
Else
Call ConnectionDoc.ReplaceItemValue("OptionalNetworkAddress", "10.2.5.34")
Call ConnectionDoc.ReplaceItemValue("PhoneNumber", "10.2.5.34")
Call ConnectionDoc.Save(True, False)
Msgbox "Changes Made", 64, "Connection Update"
End If
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top