getting info from address book - short hint please

fraengi
11-19-2003, 02:58 AM
Hello,
I am trying to get some information from the GAL:
But I need a cell from the "details" menu. AddressEntry.Details shows only the menue ...
How can I get the content of the fields ?



Dim outAddr As AddressList
Sub getglobadd()
Set outAddr = Application.Session.AddressLists("Globales Adressbuch")
Set outAddrEntr = outAddr.AddressEntries
For x = 1 To 100 ' get first 100
Debug.Print outAddrEntr.Item(x).Name
Debug.Print outAddrEntr.Item(x).Address
Debug.Print outAddrEntr.Item(x).Type
Debug.Print outAddrEntr.Item(x).ID
Next x
End Sub

...gives me only information about name,address...etc

I have found:
Debug.Print outAddrEntr.Item(x).Fields(CdoPR_ACCOUNT).Value
but this does not work. Seems to be a CDO feature.
AddressEntries has not object "Fields"
How can I access the other fields like:surname, initials etc.. ?
???

Thanks for a short hint...!
Ciao Frank

JordanChris
11-19-2003, 07:14 AM
Look up the AddressEntry and AddressEntries objects in the help within Outlook (Outlook, Tools, Macro, Visual Basic Editor, F1).

You will see that there are not many properties in an AddressEntry - not nearly as many as Outlook can see through the normal UI.

fraengi
11-20-2003, 01:21 AM
Morning,

first thanks for the reply...I have noticed, that there are only name, address, ID ... in the AddresEntry
But where can I find the other information. Is it in "contacts" ? If yes, I do not know how to get from the "Global Addressbook" to the corresponding contact. The information is not in my contact folder (I know how to search my contact folder). It must be somewhere on the exchange server. But if I can see the information using AddressEntry.Details there must be a way to get the string...
Thanks for an answer.
Ciao Frank



Look up the AddressEntry and AddressEntries objects in the help within Outlook (Outlook, Tools, Macro, Visual Basic Editor, F1).

You will see that there are not many properties in an AddressEntry - not nearly as many as Outlook can see through the normal UI.

JordanChris
11-20-2003, 03:04 AM
>>>But if I can see the information using AddressEntry.Details there must be a way to get the string...

If you can see the information from AddressEntry.Details - then that is the way to get the string!


The Outlook Automation and VB available Object Model does NOT have access to everything that the Outlook UI can see.

If the information is in Exchange, then you might do better to make use of CDO to get the information - see www.CDOlive.com. Or, if you are using Exchange 2000 and the Active Directory, then you might be able to use ADSI or other AD integration techniques

fraengi
11-20-2003, 05:23 AM
>>>But if I can see the information using AddressEntry.Details there must be a way to get the string...

If you can see the information from AddressEntry.Details - then that is the way to get the string!

..Hmm I think this was a missunderstanding. Using AddressEntry.Details brings up a window with the information. But there is no way to get the content of the cells.
:-(

But CDO seems to be the way to go, after what I have read about it up to know.

Ciao Frank

The Outlook Automation and VB available Object Model does NOT have access to everything that the Outlook UI can see.

If the information is in Exchange, then you might do better to make use of CDO to get the information - see www.CDOlive.com. Or, if you are using Exchange 2000 and the Active Directory, then you might be able to use ADSI or other AD integration techniques

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum