Sunjinsak
Board Regular
- Joined
- Jul 13, 2011
- Messages
- 151
- Office Version
- 365
- 2019
- 2016
- 2013
- Platform
- Windows
Hi,
I’m looking for a way to query a specific Outlook distribution list from Excel to see if a member of staff is included on it or not.
I’ve searched quite extensively for a solution and I’ve found plenty of examples of how to extract all the members of a DL, or how to add people to a DL etc. but I’ve not found quite what I’m looking for.
I’ve tried to use some of the example code as a base and figure out what I want from there but I’m just not getting it.
Can anyone help?
I was planning on writing a function I could call whenever I need to check. Something along the lines of the following…
It’s the querying the DL bit I can’t get. I know I’ll need to include a reference to Microsoft Outlook 14.0 Object Library.
I’m using Excel 2013 and Outlook 2010 on Windows 7 Pro.
Thanks in advance for any help or suggestions.
I’m looking for a way to query a specific Outlook distribution list from Excel to see if a member of staff is included on it or not.
I’ve searched quite extensively for a solution and I’ve found plenty of examples of how to extract all the members of a DL, or how to add people to a DL etc. but I’ve not found quite what I’m looking for.
I’ve tried to use some of the example code as a base and figure out what I want from there but I’m just not getting it.
Can anyone help?
I was planning on writing a function I could call whenever I need to check. Something along the lines of the following…
Code:
Function isMemberOfDL (sPersonToLookUp As String, sDLToQuery As String) As Boolean
‘code to query DL here?
‘isMemberOfDL = True/False based on result of above
End Function
It’s the querying the DL bit I can’t get. I know I’ll need to include a reference to Microsoft Outlook 14.0 Object Library.
I’m using Excel 2013 and Outlook 2010 on Windows 7 Pro.
Thanks in advance for any help or suggestions.