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

x
?
Solved

CDO and the Address book

Posted on 2001-07-05
3
Medium Priority
?
350 Views
Last Modified: 2008-03-17
Using MAPI I can open the address book using

MAPIMessage.Action = vbMessageShowAddressBook

and then with code copy the selected addresses into a variable

How can I achieve the same using CDO 1.x

0
Comment
Question by:mutrus
[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
3 Comments
 
LVL 16

Expert Comment

by:Neo_mvps
ID: 6255734
' Using CDO 1.x

' Explicit declares require one to add a reference to the
' CDO library

Dim oSession As MAPI.Session
Dim oRecipients As MAPI.Recipients

Set oSession = CreateObject("MAPI.Session")

' logon to the session
oSession.Logon "Profile", "Password", False, False

' if Outlook is already running then we could have done
' the following to piggy back on existing session
' oSession.Logon "","", False, False


' Recipients is a collection
Set oRecipients = oSession.AddressBook

' warning if user presses the cancel button, it will
' raise an error that you will have to catch and handle

0
 
LVL 16

Accepted Solution

by:
Neo_mvps earned 400 total points
ID: 6262043
Changing comment to answer...
0
 

Author Comment

by:mutrus
ID: 6262133
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

705 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