![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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. |
Ads |
#2
|
|||
|
|||
![]()
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. -- 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 ... 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. |
#3
|
|||
|
|||
![]() 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 "Ken Slovak - [MVP - Outlook]" 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. -- 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 ... 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. . |
#4
|
|||
|
|||
![]()
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 |
#5
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |