Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Showing Outlook address book in VB

Posted on 2004-10-01
6
Medium Priority
?
237 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 1000 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 1000 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

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
This is about my first experience with programming Arduino.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Starting up a Project

661 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