Please add a ref to Outlook via Tools/References, then see the Object
Browser (F2), it shows Outlook's objects, properties etc.
From Outlook's Application object get a ref to its Namespace object:
Dim Ns as Outlook.Namespace
Set Ns=OLApp.GetNamespace("MAPI")
Then use GetDefaultFolder for the default contacts folder. It has an Items
collection, which you can walk through and read each item's properties. You
must be aware that a contact folder may contain two kind of object types:
ContactItem and DistlistItem.
Additionally, calling that from Excel you'll get a security prompt. Please
read here for your possibilities to handle that:
http://www.outlookcode.com/d/sec.htm
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German:
http://www.VBOffice.net/product.html?pub=6)
Am 1 Jan 2007 06:18:58 -0800 schrieb Oggy: