Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook - General Queries (http://www.outlookbanter.com/outlook-general-queries/)
-   -   Redemption library - Add distribution list as member to another distributionlist (http://www.outlookbanter.com/outlook-general-queries/16695-redemption-library-add-distribution-list.html)

Tommy Ipsen June 2nd 06 10:23 PM

Redemption library - Add distribution list as member to another distributionlist
 
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


All times are GMT +1. The time now is 12:43 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com