How to display Addressbook from VBA

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
 
K

Ken Slovak - [MVP - Outlook]

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

Guest

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
 
G

Guest

Ken,

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

Thanks

Maurice
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top