How to obtain the Distribution List of a Sender

Status
Not open for further replies.
A

Alberto

Hello,

I'd like to know if it's possible to find if the sender of a mail over

Exchange server is a member of an specific Distribution List (in Exchange) so

this mail can be automatically marked. In other words, i´d like to konw if i

can acces the organizational address book. I'm afraid no but i ask here to

confirm it.

I'm using Outlook 2003. If i used Outlook 2007 would it be possible?

The solution should't show any prompts because a macro has to do this job on

the Inbox folder automatically.

Lot of thanks,

Alberto.
 
The GAL (Global Address List) is available as one of the members of the

AddressLists collection. You can iterate that collection to find the GAL or

ask for it directly using the Item member of the collection. Once you have

that AddressList you can get its AddressEntries collection and iterate that

to get a specific DL and then get its members.

That will work in Outlook 2003.

"Alberto" <Alberto> wrote in message

news:73E452B2-A626-41AC-85CB-BE21EDDA46E0@microsoft.com...
> Hello,

> I'd like to know if it's possible to find if the sender of a mail over
> Exchange server is a member of an specific Distribution List (in Exchange)
> so
> this mail can be automatically marked. In other words, i´d like to konw
> if i
> can acces the organizational address book. I'm afraid no but i ask here to
> confirm it.

> I'm using Outlook 2003. If i used Outlook 2007 would it be possible?

> The solution should't show any prompts because a macro has to do this job
> on
> the Inbox folder automatically.

> Lot of thanks,

> Alberto.
>
 
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
wrote:


> The GAL (Global Address List) is available as one of the members of the
> AddressLists collection. You can iterate that collection to find the GAL or
> ask for it directly using the Item member of the collection. Once you have
> that AddressList you can get its AddressEntries collection and iterate that
> to get a specific DL and then get its members.

> That will work in Outlook 2003.

> >

>

> "Alberto" <Alberto> wrote in message
> news:73E452B2-A626-41AC-85CB-BE21EDDA46E0@microsoft.com...
> > Hello,
> > I'd like to know if it's possible to find if the sender of a mail over
> > Exchange server is a member of an specific Distribution List (in Exchange)
> > so
> > this mail can be automatically marked. In other words, i´d like to konw
> > if i
> > can acces the organizational address book. I'm afraid no but i ask here to
> > confirm it.
> > I'm using Outlook 2003. If i used Outlook 2007 would it be possible?
> > The solution should't show any prompts because a macro has to do this job
> > on
> > the Inbox folder automatically.
> > Lot of thanks,
> > Alberto.
> >


> .
>
 
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.

"Alberto" <Alberto> wrote in message

news:07CFB6E7-9E4F-46C8-A8B3-4255DB8AA876@microsoft.com...

> 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
 
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/rdo/RDOAddressEntry.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)

-
<kenslovak@mvps.org> wrote in message

news:%23WHtZQrcKHA.4880@TK2MSFTNGP05.phx.gbl...
> 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.

> >

>

> "Alberto" <Alberto> wrote in message
> news:07CFB6E7-9E4F-46C8-A8B3-4255DB8AA876@microsoft.com...
>

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

>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
F Obtain Members of a Distribution List Outlook 2003 c# Outlook VBA and Custom Forms 1
J Using Access to obtain E-mail address Outlook VBA and Custom Forms 5
L How I can obtain the text storage in a textbox in outlook? Outlook VBA and Custom Forms 1
V Is there no way to obtain sender's emailid from outlook calender d Outlook VBA and Custom Forms 7
M Obtain property value by name Outlook VBA and Custom Forms 5
M How can we find the list of users who are members of a deleted distribution list? Exchange Server Administration 2
Healy Consultants Macro to remove inside organization distribution list email address when reply to all recepients Outlook VBA and Custom Forms 0
M Auto expand Distribution List Before Sending Email Outlook VBA and Custom Forms 1
E Distribution lists Using Outlook 1
M Question about nested distribution lists Outlook VBA and Custom Forms 3
G Bcc help - Preventing multiple forwards from a bcc'd distribution group Using Outlook 1
A Are categories still recommended for creating local distribution lists? Using Outlook 3
Diane Poremsky Using Categories for Dynamic Distribution Lists Using Outlook 0
N Recurring invite sent w/distribution list adding/removing attendees Using Outlook 0
D Macro to scan email distribution list when replying Using Outlook 2
Diane Poremsky Find the Distribution Lists a Contact Belongs to Using Outlook 0
T Missing sub-contact folders (distribution lists) Using Outlook 3
J Maintain Distribution List Using Outlook 3
S Finding Distribution List Name Outlook VBA and Custom Forms 3
J Outlook 2013 - Exchange 2007 manage distribution group Exchange Server Administration 1
K Rule for Distribution List Using Outlook 0
M add contacts to shared contacts distribution list Using Outlook 1
M Nested distribution lists: how to count UNIQUE # of people... Outlook VBA and Custom Forms 13
M VBA script to allow mail merges of distribution groups? Using Outlook 7
E Add sender to distribution list? Using Outlook 3
B Restore deleted contact distribution list Using Outlook 1
L Convert Distribution List of Contacts to Single Contacts Using Outlook 6
C Office 2007 Distribution Lists Using Outlook 1
W Combine Mail Merge to Distribution List with Auto Attachments - Outlook 2007 Using Outlook 1
Jennifer Murphy Distribution list fails after conversion to Unicode PST Using Outlook 2
C Can't import distribution list - help, please Using Outlook 1
M Distribution List with hundreds of emails Using Outlook 1
L Individual E-mails from Distribution List Using Outlook 5
M Import distribution list into MS Exchange Sharepoint Exchange Server Administration 3
G Distribution Group Owners Cannot Add/Delete Members Using Outlook 1
G Distribution Group administration Using Outlook 1
A Why doesn't distribution lists update automatically Using Outlook 3
L Send E-mail with VBA code from [E-mail Distribution Group] if I have “Send as” Using Outlook 6
T Distribution List - Export/Import Using Outlook 4
K Creating a New Distribution List from an Existing one Using Outlook 0
C How do I hide distribution list from global contacts for certain users? Exchange Server Administration 1
A Lock the distribution list Using Outlook 1
L Sending from a distribution list email Using Outlook 6
K outlook 2007 Export/Import Distribution lists Using Outlook 1
J Automatically CC to another user when sending from Distribution List Using Outlook 2
K Autocomplete list not saving distribution list Using Outlook 3
N Personal Distribution Lists Using Outlook 0
T Unable to edit Distribution Group membership via Outlook (works via ECP). Exchange Server Administration 7
R How do I expand all distribution lists in the To: section? Using Outlook 4
K loop through distribution group (and potentially, embedded DGs) by Outlook VBA and Custom Forms 1

Similar threads

Back
Top