Solved

Showing Outlook address book in VB

Posted on 2004-10-01
6
235 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

This is an explanation of a simple data model to help parse a JSON feed
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Introduction to Processes

734 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