show this address list first

G

Goldy1234

I would like to be able to set a certain address list (a list that exists
under the Outlook Address Book) to be the first list shown in the Outlook
Address Book and when composing messages etc.

Can you give me some sample of code?!
 
D

Dmitry Streblechenko

On the Extended MAPI level (C++ or Delphi only), you would need to call
IAddrBook.SetDefaultDir().
<plug> Redemption (any programming language, URL below) would let you do
that using RDOAddressBook.DefaultAddressList or RDOAddressList.Default
properties </plug>

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
G

Goldy1234

I'm writing this code in outlook 2003 macro editor (visual basic 6.5). It's
theres a way to do it?
 
G

Goldy1234

OK, I figure it out, but I've got one problem:

in the fild Session\AddressBook\DefaultAddressList\AddressLists there is a
error <Error in IABContainer.GetHierarchyTable: MAPI_E_UNKNOWN_FLAGS Error:
An unknown flag was passed into a method.>

because of that I can't select adresslist

sample of my code

Set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
Set AddrList = Session.AddressBook.AddressLists.Item("Users")
Session.AddressBook.DefaultAddressList = AddrList
 
D

Dmitry Streblechenko

Send an e-mail to my private e-mail address, I'll send you a debug version
of the dll tha twill create a debug log.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top