Solved

Showing Outlook address book in VB

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
changeXy challenge 13 67
changePi Challenge 15 104
firstChar challenge 13 107
Definitions and default visual studio colors 5 58
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
A short article about problems I had with the new location API and permissions in Marshmallow
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now