Good morning All,
I have built a small database usage utility which basically shows who logged into the Db, when and what version was used.
I'm bringing back the users log on Id such as AB12345 and I'd like to be able to some how link into the Outlook address book to be able to resolve the users name and possibly location if stored in their Outlook properties.
Is this possible?
Any suggestions would be most appreciated.
Matt
Hi!
I'm not very experienced with Outlook object model, but I've tried the following code retrieving AddressList from Outlook and it works fine.
Sure this is very simple but it gives a basic idea I think.
Outlook popups a security dialog than the sub tries to retrieve AddressList. At this point I don't yet know how to avoid it.
-
Public Sub GetAddressEntries()
-
-
Dim appOutlook As Outlook.Application
-
Dim objAddressList As Outlook.AddressList
-
-
Set appOutlook = CreateObject(Class:="Outlook.Application")
-
Set objAddressList = appOutlook.Session.AddressLists(1)
-
-
For Each ae In objAddressList.AddressEntries
-
Debug.Print ae.Name
-
Next
-
-
appOutlook.Quit
-
Set objAddressList = Nothing
-
Set appOutlook = Nothing
-
-
End Sub
-