mutrus
asked on
CDO and the Address book
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
MAPIMessage.Action = vbMessageShowAddressBook
and then with code copy the selected addresses into a variable
How can I achieve the same using CDO 1.x
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
' 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