About This Code
Brief Description:
Button: Remove Cached IP Adresses in Lotus Notes Client
Contributor:
Bastian Wieczorek
Notes Version:
R6.x, R7.x
Last Modified:
08 Nov 2006
OpenNTF Disclaimer
All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.
Code / Description
This Script will remove all cached IPs from the location documents in a lotus notes client. It is very usefull if you will change the IP from your Lotus Domino Server.
You can put this code into a button and send it via email to the all users in your company...
Usage / Example
Dim session As New NotesSession
Dim db As New NotesDatabase("", "names.nsf" )
' Dim db As NotesDatabase
Dim view As NotesView
Dim count As Integer
Dim doc As NotesDocument
Set view = db.GetView(Locations)
Set doc = view.GetFirstDocument
While Not ( doc Is Nothing )
Dim item1 As NotesItem
Dim item2 As NotesItem
Dim item3 As NotesItem
Dim item4 As NotesItem
Dim item5 As NotesItem
Set item1 = doc.ReplaceItemValue( "$SavedAddresses","")
Set item2 = doc.ReplaceItemValue( "$SavedPorts","")
Set item3 = doc.ReplaceItemValue( "$SavedServers","")
Set item4 = doc.ReplaceItemValue( "$SavedDate","")
Set item5 = doc.ReplaceItemValue( "$SavedTriedDate","")
Call doc.Save( True, True )
Set doc = view.GetNextDocument( doc )
Wend
Code Attachments