• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 243
  • Last Modified:

Showing Outlook address book in VB

At the moment I'm trying to make up an automatic mailer in work, I have a text box with a standard template and a few fill in the blanks.

My problem is that when I'm sending a mail and fill in the 'to' field I have to know the exact username or exact name for visual basic to validate it with outlook or I get an error saying the user can't be validated.

I saw in another application how they had a text box done up like the 'to' field in outlook and when you type in a partial name the actual outlook address book popped up.

Does anyone know how to do this?

I'm connecting to outlook through the reference
e.g.
Dim ol As Outlook.Application
Dim ns As Outlook.NameSpace
Dim newMail As Outlook.MailItem
etc...
0
Turlock
Asked:
Turlock
  • 2
2 Solutions
 
bochgochCommented:
The following link gives you all you need to bring up the address book:

http://www.outlookcode.com/d/code/selectnames.htm

Is that what you're after?
0
 
TurlockAuthor Commented:
No, unfortunatley not, I'm looking to basically get an address book button through Visual basic
0
 
santosh26676Commented:
may be you can loop theu the "contacts" folder using the outlook object and read all the names mentioned in the folder.

Hope this helps!!!
0
 
bochgochCommented:
Use the addresslists collection:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000/html/olobjRecipients.asp

The easiest method to work with these collections is to generate a reference to them in your code and then work through in debug adding watches as appropriate to gradually discover more....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now