LotusScript Call vecol.DeleteEntry useage

Good Morning,

Here’s the scenario: We have a bogus entry that keeps appearing in our users Recent Contacts list. When the users try to email the person, the bogus entry is always used. I keep telling my users to just go in and removed the bogus entry from their recent contacts, but you know how that goes.

I found a solution to just delete all the contacts in the recent contacts list, but we don’t want that happening all the time. When I was messing around I saw a LotusScript command called:

vecol.DeleteEntry

Can I use this command to look in the recent contacts list to delete just one entry in there?

This is what I was thinking:

Sub Click(Source As Button)

Dim nab As notesdatabase

Set nab = New notesdatabase("", "names.nsf")

Dim view As notesview

Set view = nab.getview("(Recent Contacts)")

Dim vecol As notesviewentrycollection

Set vecol = view.allentries

Call vecol.removeall(True)    <------------Remove this line

   Call vecol.DeleteEntry           <-------------Add this line to remove the bogus name, I'll call him Alan Edwards

End Sub

Thank you for any help you can give me.

Subject: I gueess you will need to delete the actual doc then just the entry

you can use the code up til Set vecol = view.allentries

Then get the entry you want to delete, and get the backend document. finally just remove that document. deleteentry will only remove the entry from the viewentrycollection that is in the memory not from the actual (Recent Contacts) view.

Dim firstentry As notesviewentry

Set firstentry = vecol.GetFirstEntry

Dim doc As notesdocument

Set doc = firstentry.Document

Call doc.remove(True)