BusinessObjects Board

Get user information from Exchange global address list (GAL)

The attached utility is used to “harvest” user information from an Exchange global address list (GAL). It uses CDO (Collaboration Data Objects) to create a MAPI session, then accesses the GAL from there.

As written, it grabs an existing MAPI session, so have Outlook running first. Also, CDO is VERY security conscious, so there will be a popup asking permission. You can set the permission to be granted for a period of up to 10 minutes. If it takes longer than 10 minutes, the popup will appear again. There are third-party replacements for CDO that avoid this annoyance, but this version should be rather universal. Otherwise, the usage is straightforward … open the document and hit refresh.
Get Users from GAL.rep (75.0 KB)


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

give me please sources this it.


mr_max :ru: (BOB member since 2008-06-25)

I believe the code is contained with the DeskI/fullclient document.
Just go to Tools > Macro > Visual Basic Editor menu.


darcstorm :philippines: (BOB member since 2008-07-22)

Upon hitting refresh I get “can’t find project or library” and the “DIM mysession as mapi.session” is highlighted. I am running BO XI R2 and Office 2007.


jgeagle5 (BOB member since 2009-05-07)

I have no issues with Office 2007. Go to the VB Editor (Alt-F11), then Tools, References… It should highlight which library is missing. I’m guessing it’s the CDO 1.21 library, but that is included with every Windows version released in at least the last 10 years.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)