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
Solved

CDO and the Address book

Posted on 2001-07-05
3
340 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
  • 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 100 total points
ID: 6262043
Changing comment to answer...
0
 

Author Comment

by:mutrus
ID: 6262133
Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Validating VB6 Function 19 65
Macro: print each sheet to pdf using ExportAsFixedFormat 11 52
VBA filters 2 64
Zip Folders Using Chilkat Routines 1 58
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

809 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