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