I found this technote http://www-01.ibm.com/support/docview.wss?rs=899&uid=swg21214562 talking about how to replace existing value in SametimeServer field with null value. This is going to replace existing value for all location doc to null, my goal is to replace this value to only some of location doc not all. i.e. I do want to replace this field with only for OFFLINE and ISLAND locations but no others, can someone help modifying this piece of code for this purpose?
TIA
Sub Click(Source As Button)
Dim session As New notessession
’ For The Current User in The Current Session, Get All The NABs
Forall books In session.addressbooks
'Check If The Current NAB is Private or Public
'If The NAB Is Private, Than It Should Be Your Personal NAB
If books.isprivateaddressbook Then
'Verify if The NAB is Open, If Not, Open it
If Not(Books.isopen) Then
Call Books.open(“”,books.filename)
'Now Get All The Documents in The Location View
Set view = books.getview(“Locations”)
Set doc = view.getfirstdocument
'For All The Documents in The View
While Not (doc Is Nothing)
'To overwrite a field use the ReplaceItemValue method.
'For example, the below line overwrites the SametimeServer field with the desired null entry
Call doc.replaceitemvalue (“SametimeServer”,“”)
Call doc.save (True,True)
'Get Next document
Set doc = view.getnextdocument(doc)
Wend
End If
End If
End Forall
End Sub