Redemption: Add distribution list to another distribution list

T

Tommy Ipsen

Hi all

I'm using the Redemption.dll in Outlook VBA and trying to add a
distribution list as a member of another distribution list!

Code example:

Dim objMasterDL As Redemption.RDODistListItem
Dim objSlaveDL As Redemption.RDODistListItem

Set objSlaveDL = someMAPIFolder.Items.Add(olDistributionListItem)
'Code to add members to objSlaveDL, name it, save it (and close it?)
Set objMasterDL = someMAPIFolder.Items.Add(olDistributionListItem)

How should I add objSlaveDL as a member to objMasterDL? I tried
resolving the objSlaveDL against the AddressList corresponding to
SomeMAPIFolder in order to use the resulting AddressEntry as input for
the AddMember method. Unfortunately I received an ambiguous name error
trying to resolve the name of the objSlaveDL - either because several
DL's exists with almost similar names or because I'm running in Cached
Exchange Mode?

The distribution lists I'm working with are the following:

"BB - Medlemmer" (Master DL)
"BB - Medlemmer - del 1 af 4" (Slave DL 1)
"BB - Medlemmer - del 2 af 4" (Slave DL 2)
"BB - Medlemmer - del 3 af 4" (Slave DL 3)
"BB - Medlemmer - del 4 af 4" (Slave DL 4)

When trying to resolve for example "BB - Medlemmer - del 4 af 4" against
the addresslist corresponding to the containing MAPI-Folder I receive
the "ambiguous..." error but if I delete all the other Slave DL's the
one left resolves without problems... :-/

I need to create the primary distribution list programmatically in a
public folder and the members are contacts from another public folder -
possibly several hundred contacts! Because of Exchange/Outlooks problem
with handling large distribution lists I create smaller distribution
lists which should the be added to the master list in the end! I'm using
Outlook 2003 and to my knowledge we're running an Exchange 2000 server!

Hope you can help me out since I'm rather stuck right now...

Cheers, Tommy Ipsen
 
K

Ken Slovak - [MVP - Outlook]

Try using names without spaces or dashes and see if it helps. Or name them
something a little more distinctive.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top