/ Forums / Advansys Formativ / Creating Solutions with Formativ / Zombies: Undelete-able address book entries / Reply To: Zombies: Undelete-able address book entries

#6628
emsegal
Participant

Thanks, but that did not solve the problem. First, I think there were some errors in your code: AddressBookEntries is not a property of AddressBook.I got an error when I ran the code as you wrote it, so I changed it as follows:

Sub Main(Client, GWEvent)

Dim objAddressBooks
Dim objAddessBook
Dim objAddressBookEntry
Dim iCount
Dim x

‘ Get the address books object
Set objAddressBooks = GroupWise.Account.AddressBooks

‘ Locate the address book called “Test Account”
Set objAddressBook = objAddressBooks.Item(“Test Account”)

iCount = objAddressBook.Count

for x = iCount to 1 step -1
set objAddressBookEntry = objAddressBook.Item(x)
objAddressBookEntry.Delete
next

Set objAddressBooks = nothing

End Sub

This ended up having the same problem: it deletes the “normal” address book entries with a name and an email address, but it does not ignore the entries that either
a) have a name and no email address, or
b) are an entry for an organization only.
I can delete these manually, but I need to find a way for my program to do it.

If it would help, my system is on VNC, (like PCAnywhere) and you could take a look at what I am talking about. Thanks,

Eric