PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Form Programming Redemption: Add distribution list to another distribution list

Reply

Redemption: Add distribution list to another distribution list

 
Thread Tools Rate Thread
Old 06-06-2006, 08:19 AM   #1
Tommy Ipsen
Guest
 
Posts: n/a
Default Redemption: Add distribution list to another distribution list


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
  Reply With Quote
Old 06-06-2006, 02:27 PM   #2
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Redemption: Add distribution list to another distribution list

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

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Tommy Ipsen" <tipsen@imada.sdu.dk> wrote in message
news:32b47$44852c77$57ef4723$5124@news.nal-medienet.dk...
> 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


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off