Subject: RE: Edit the current location only using lotusscript
hi stan, well, i’m not that familiar with the statement split(), could you elaborate me more or discuss briefly some info about the statement, if you don’t mind?
well this is my current script, would you mind evaluate it? thanks…
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim session As New NotesSession
Dim db As New NotesDatabase(“”,“names.nsf”)
Dim view As notesview
Dim doc As NotesDocument
Dim a As Integer
Dim tmp As String
Dim curloc As String
Set uidoc = workspace.CurrentDocument
Set view = db.GetView(“Locations”)
curloc=session.getenvironmentstring(“Location”, True)
For a=1 To Len(curloc)
tmp=Left(curloc,a)
If Right(tmp,1)=“,” Then useloc=Left(curloc,a-1)
If Right(tmp,1)=“,” Then Goto Found
Found:
Set doc = view…GetFirstDocument
If curloc = doc.LocationName(0) Then
If doc.MailServer(0) <> “” Then
doc.sametimeserver = “Server2/GS3”
Call doc.Save(True,False)
End If
Set doc = view.GetNextDocument(doc)
End If
next