A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Creating a nested distribution list using vba



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 16th 06, 09:43 PM posted to microsoft.public.outlook.program_vba
Hal
external usenet poster
 
Posts: 22
Default Creating a nested distribution list using vba

Does any one have sample code on how to create a nest DL using VBA code ?


Ads
  #2  
Old October 17th 06, 05:44 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Creating a nested distribution list using vba

Am Mon, 16 Oct 2006 13:43:01 -0700 schrieb Hal:

What is a "nested" list?

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Does any one have sample code on how to create a nest DL using VBA code ?

  #3  
Old October 17th 06, 01:50 PM posted to microsoft.public.outlook.program_vba
Hal
external usenet poster
 
Posts: 22
Default Creating a nested distribution list using vba

Michael

Since DLs have a limit of 160 members or so when the user is on Exchange,
the way around this problem is to create a DL within a DL.. This is also none
as a nested DL.



"Michael Bauer [MVP - Outlook]" wrote:

Am Mon, 16 Oct 2006 13:43:01 -0700 schrieb Hal:

What is a "nested" list?

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Does any one have sample code on how to create a nest DL using VBA code ?


  #4  
Old October 18th 06, 06:07 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Creating a nested distribution list using vba

Am Tue, 17 Oct 2006 05:50:02 -0700 schrieb Hal:

Thanks Hal, my dictionary doesn´t know that word.

Here´s a sample of how to do that, however I´m not sure if you really can
reliably workaround the limit:

Public Sub CreateNestedDL()
Dim DL As Outlook.DistListItem
Dim Mail As Outlook.MailItem

' Assuming there´s a DL selected:
Set DL = Application.ActiveExplorer.Selection(1)
Set Mail = Application.CreateItem(olMailItem)

' The DL´s name must be unique so that it resolves:
Mail.Recipients.Add DL.DLName
Debug.Print Mail.Recipients.ResolveAll

Set DL = Application.CreateItem(olDistributionListItem)
DL.AddMembers Mail.Recipients
DL.DLName = "test nest"
DL.Save
DL.Display
End Sub

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Michael

Since DLs have a limit of 160 members or so when the user is on Exchange,
the way around this problem is to create a DL within a DL.. This is also

none
as a nested DL.



"Michael Bauer [MVP - Outlook]" wrote:

Am Mon, 16 Oct 2006 13:43:01 -0700 schrieb Hal:

What is a "nested" list?

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Does any one have sample code on how to create a nest DL using VBA code

?

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested distribution lists Hal Outlook and VBA 5 October 14th 06 05:54 AM
Redemption: Add distribution list to another distribution list Tommy Ipsen Outlook - Using Forms 1 June 6th 06 02:27 PM
Creating a rule for a distribution list? Nicole Outlook - Using Contacts 2 May 5th 06 04:45 AM
Nested Distribution Lists in shared contacts don't work Doda McCheesle Outlook - Using Contacts 0 February 24th 06 12:02 PM
Creating own rules using VBA? Michael Mueller Outlook and VBA 2 February 16th 06 01:54 PM


All times are GMT +1. The time now is 03:58 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-2025 Outlook Banter.
The comments are property of their posters.