Remove Members glitch?

  • Thread starter Thread starter Andy Boruta
  • Start date Start date
A

Andy Boruta

I rebuild a distribution list by removing all members, then adding the
updated members. This allows for the email address autofill to work
properly. My problem is that email addresses that do not resolve using
RESOLVEALL (addresses external to my company) are not removed using
REMOVEMEMBERS method.

Any thoughts on how to get around this?


For x = 1 To myDistList.MemberCount
myRecipients2.Add myDistList.GetMember(x)
Next x
myRecipients2.ResolveAll
myDistList.RemoveMembers myRecipients2
Set myRecipients2 = Nothing
 
For some reason, the auto-fill functionality when you send an email remembers
the deleted DL, which is now invalid. I reuse the same DL name, so the only
way I can again use the autofill feature is to delete the autofill entry, and
search for the new DL.
 
You might want to remove two MAPI properties using
DistListItem.PropertyAccessor (Outlook 2007) used to store the list members
http://schemas.microsoft.com/mapi/id/{00062004-0000-0000-C000-000000000046}/80551102
http://schemas.microsoft.com/mapi/id/{00062004-0000-0000-C000-000000000046}/80541102
But I have never tried that before and I don't know if PropertyAccessor
would let you do that.

You can try to use Redemption (url below) - RDODistListItem object exposes
RemoveMember method which (unlike OOM) takes an integer index rather than a
Recipient object.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
Back
Top