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

How to obtain the Distribution List of a Sender



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5  
Old December 2nd 09, 05:11 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to obtain the Distribution List of a Sender

Actually on the MAPI level, PR_EMS_AB_IS_MEMBER_OF_DL property can be
retrieved as IMAPITable. It will list all the DLs that the giveb user is a
member of.
plug
Redemption exposes PR_EMS_AB_IS_MEMBER_OF_DL as
theRDOAddressEntry.IsMemberOfDL property -
http://www.dimastr.com/redemption/rd...dressEntry.htm

set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set AddressEntry = Session.AddressBook.GAL.ResolveName("dmitry")
Debug.Print "-- Delegates (who can send of behalf of " & AddressEntry.Name
& ")"
for each AE in AddressEntry.Delegates
Debug.Print AE.Name
next
Debug.Print "-- Is delegate for (can send on behalf of these users)"
for each AE in AddressEntry.IsDelegateFor
Debug.Print AE.Name
next
Debug.Print "-- Is member of the following Dist Lists:"
for each AE in AddressEntry.IsMemberOfDL
Debug.Print AE.Name
next
Debug.Print "-- The following users report to " & AddressEntry.Name
for each AE in AddressEntry.Reports
Debug.Print AE.Name
next

/plug

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Ken Slovak - [MVP - Outlook]" wrote in message
...
VBA is irrelevant, it would be the same with VB6, VB.NET, C# or any other
language. The limitations are what's available in the Outlook object
model. Even other lower level API's wouldn't let you query which DL's a
person belongs to, perhaps an LDAP query might do that. That I'm not sure
of, I rarely use LDAP.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Alberto" wrote in message
...

Thanks Ken,

it really helps me, I can read the members of a DL but the other way
would
be esaier for me, I mean, to obtain the DLs a sernder of a mail is
member
of through the GAL. I'm afraid this way is not possible with only de VBA
object model.

Alberto




 




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
unable to obtain list of tables from data source when mail mergin Pam Outlook - Using Contacts 1 November 9th 08 04:00 AM
embedded distribution list to new distribution list in outlook Brad Tulin Outlook - Using Contacts 2 October 22nd 08 01:20 AM
Temporarily Exclude sender ABC from distribution list מיכאל (מיקי) אבידן® Outlook and VBA 6 February 5th 08 07:46 PM
unable to obtain list of tables from the data source Hal Outlook - Using Contacts 2 February 27th 07 05:52 PM
Junk mail: How to create a button for "Add sender to blocked sender list" Nananana Outlook - General Queries 2 February 2nd 06 12:37 PM


All times are GMT +1. The time now is 03:42 PM.


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.