PDA

View Full Version : How to delete an AddressEntry



sluice
06-05-2008, 09:02 AM
I have a number (counter) of email addresses in an AddressList which I have copied into an array (arAgencyemail). I also have a number of emails (bodycount) that contain email addresses in the body of the email. I have copied the email body texts into another array (arBodies). I want to search through the arAgencyemail array and where the email address matches one in the body text array, delete the corresponding address in the AddressList.
How do I find the addressEntry so that I can delete it. I know its number in the Index of the AddressList from the outer For.....Next loop but I can't work out how to delete it.

For x = 1 To counter
For y = 1 To bodycount
If InStr(arAgencyemail(x), arBodies(y)) Then

' olAgency.Delete????
End If
Next
Next
.
~Oorang

Oorang
06-18-2008, 09:05 AM
Hi Sluice,
Welcome to the board:) Could you please post the complete code? Thanks:)

Charlize
06-19-2008, 03:12 AM
I have a number (counter) of email addresses in an AddressList which I have copied into an array (arAgencyemail). I also have a number of emails (bodycount) that contain email addresses in the body of the email. I have copied the email body texts into another array (arBodies). I want to search through the arAgencyemail array and where the email address matches one in the body text array, delete the corresponding address in the AddressList.
How do I find the addressEntry so that I can delete it. I know its number in the Index of the AddressList from the outer For.....Next loop but I can't work out how to delete it.

For x = 1 To counter
For y = 1 To bodycount
If InStr(arAgencyemail(x), arBodies(y)) Then

' olAgency.Delete????
End If
Next
Next
.
~OorangWhy putting the addressentry's in an array first. Why not using the folder off the adresses. So for every address entry in the folder, check the mailaddress in one of the mails. If found, delete the address ...

Charlize