-
Topic
-
I am trying to clean out an address book programatically. I have code like this:
dim objBook
set objBook=addressbooks.item(addressbooknumber)
j=0
do until objbook.count < 1
objbook.item[j].delete
j=j+1
Loop
set objbook=nothing
endsubHowever, this does not work. It seems to delete some entries, but not others. It does not delete the organizational entries that are automatically added when someone adds a person, and it does not delete entries with an email but no name.
For example, if I add:
name: John Smith
company: IBM Corp
email: JSmith@ibm.comand
name:
company:
email: xyz@abc.comThere will be 3 entries in the address book: one for John Smith, one for IBM, and one for xyz@abc.com. If I run the code above, only the first one will be deleted. After that, objbook.count=0 so the program thinks it is done and quits.
I tried changing the code to the following:
dim objBook
set objBook=addressbooks.item(addressbooknumber).object.addressbookentries
j=0
do until objbook.count < 1
objbook.item[j].delete
j=j+1
Loop
set objbook=nothing
endsubto use the Groupwise addressbook object but that produced identical results. Can you tell me how I can kill off these “zombie” address book entries? Thanks.
- You must be logged in to reply to this topic.