How to display Addressbook from VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm creating a userform in VBA and have a button placed next to a textfield.
What i'm trying to acomplish is that when the user clicks the button the
addressbook (for contacts) shows up and select the contact they would like.
When the addressbook is closed I want the selected emailaddresses to be
placed in my textbox.

So it's not the contacts folder that I want to see but the addressbook.

I know that this is standard functionality, but I need this for a project to
be implemented on a userform.

Any pointers in the right direction much appreciated...

Maurice
 
If you are using Outlook 2003 or earlier the only way to display the address
book is using CDO's Session.AddressBook method. You then have to convert
from the CDO objects returned to Outlook objects. CDO is an optional
installation for Outlook.

If you are using Outlook 2007 you can use the NameSpace.GetSelectNamesDialog
method.
 
Ken,

Thanks for the reply. I was afraid if that (having to use CDO) but I was
hoping that there was maybe an easier way. But he if it's CDO then I just
have to start programming and enjoy that...

Maurice
 
Ken,

Much appreciated here. That's the kind of tips that make life a lot easier.

Thanks

Maurice
 
Back
Top