lundi 30 mars 2015

Get outlook organisation team hierarchy using vba

I have a list of staff emails in an Excel sheet and I'm trying to retrieve users' organisational team hierarchy using VBA. The output I am after is like the following:


Email address, Team Hierarchy


aaa@email.com, Team 1\Team 2\Team 3\Team 4


bbb@email.com, Team 1\Team 5\Team 6\Team 7


I've seen that team hierarchy information is readily shown in Outlook (right-click contact -> Properties -> General tab -> Organisation field). So I think there should be a way to retrieve this information to a spreadsheet using VBA, but couldn't find a way to do it.


I did some research and saw that using LDAP there are ways to get the basic information directly from Active Directory such as First name, Last name, Org unit (team), etc., but couldn't find a way to get the team hierarchical view.


Appreciate if someone can help!


Cheers!


Aucun commentaire:

Enregistrer un commentaire