Solved

Showing Outlook address book in VB

Posted on 2004-10-01
6
236 Views
Last Modified: 2010-04-17
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
Comment
Question by:Turlock
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 13

Expert Comment

by:bochgoch
ID: 12201221
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
 

Author Comment

by:Turlock
ID: 12206821
No, unfortunatley not, I'm looking to basically get an address book button through Visual basic
0
 
LVL 3

Accepted Solution

by:
santosh26676 earned 250 total points
ID: 12215500
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
 
LVL 13

Assisted Solution

by:bochgoch
bochgoch earned 250 total points
ID: 12216009
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

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Starting up a Project

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question