D
Dieter Verlaeckt
Hi,
I'm developing a COM add-in for Outlook using VC++ .NET 2003.
I have the following problem: when i try to remove all recipients from a
distribution list, for some reason the last recipient never gets removed.
I used the following code for removing the recipients:
long nMemberCount = spSafeDistributionList->GetMemberCount();
for (int i = nMemberCount; i > 0; --i)
{
spSafeDistributionList->RemoveMemberEx(i); <--- always returns S_OK, also
for the last recipient.
}
nMemberCount = spSafeDistributionList->GetMemberCount(); <--- returns 1,
the last recipient did not get removed from the list.
I have also used the same code but with the normal RemoveMember() function
instead of the RemoveMemberEx() function. The result is the same.
Why doesn't this work? is there a better method for removing the recipients
(i would prefer not to recreate the distribution list itself).
TIA
Dieter
I'm developing a COM add-in for Outlook using VC++ .NET 2003.
I have the following problem: when i try to remove all recipients from a
distribution list, for some reason the last recipient never gets removed.
I used the following code for removing the recipients:
long nMemberCount = spSafeDistributionList->GetMemberCount();
for (int i = nMemberCount; i > 0; --i)
{
spSafeDistributionList->RemoveMemberEx(i); <--- always returns S_OK, also
for the last recipient.
}
nMemberCount = spSafeDistributionList->GetMemberCount(); <--- returns 1,
the last recipient did not get removed from the list.
I have also used the same code but with the normal RemoveMember() function
instead of the RemoveMemberEx() function. The result is the same.
Why doesn't this work? is there a better method for removing the recipients
(i would prefer not to recreate the distribution list itself).
TIA
Dieter